Support Questions
Find answers, ask questions, and share your expertise

Hortonworks 2.5 - Hive ACID Insert is getting hung

New Contributor


I am using HDP 2.5. I want to perform a delete operation from a Hive table. I have created a table with the following command:

hive> create table test (x int, y string) clustered by (x) into 2 buckets stored as ORC tblproperties ("transactional" = "true");


Time taken: 0.148 seconds

Further, I have set the following Hive properties:


SET hive.enforce.bucketing=true;

SET hive.exec.dynamic.partition.mode=nonstrict;

SET hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;

SET hive.compactor.initiator.on=true;

SET hive.compactor.worker.threads=1;

set hive.optimize.sort.dynamic.partition=false;

Then on, I am doing a test insert into the hive table leveraging the following command:


Unfortunately my Hive CLI shell is getting hung and I have to issue Ctrl + C command to get out of the shell. May I know why is this happening please? Is it due to the fact that my Hive schema / database contains a mixture of ACID and non-ACID tables ? Any suggestion to resolve this problem will be very helpful.

Thanks in advance !


Expert Contributor

@Debabrata Ghosh

As you have defined string datatype for variable y, try to put values in single inverted comma like below:

hive> insert into test2 values(1,'a');

I have tested the same code as it is working fine for me. Please check your hiveserver2 and hivemetastore log to find any specific warning or error messages.

hive> create table test2 (x int, y string) clustered by (x) into 2 buckets stored as ORC tblproperties ("transactional" = "true"); OK Time taken: 1.916 seconds

hive> insert into test2 values(1,'b'); Query ID = hdfs_20170408055825_c196e71f-53b3-4b1a-9d35-f33188df3915 Total jobs = 1 Launching Job 1 out of 1 Tez session was closed. Reopening... Session re-established. Status: Running (Executing on YARN cluster with App id application_1491557931364_0006) -------------------------------------------------------------------------------- VERTICES STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED -------------------------------------------------------------------------------- Map 1 .......... SUCCEEDED 1 1 0 0 0 0 Reducer 2 ...... SUCCEEDED 2 2 0 0 0 0 -------------------------------------------------------------------------------- VERTICES: 02/02 [==========================>>] 100% ELAPSED TIME: 16.77 s -------------------------------------------------------------------------------- Loading data to table test.test2 Table test.test2 stats: [numFiles=2, numRows=0, totalSize=1263, rawDataSize=0] OK Time taken: 30.181 seconds

New Contributor


Did you found any solution for the above issue, as I am also facing same problem.

Thanks in advance.

; ;