Support Questions

Find answers, ask questions, and share your expertise

Data not inserting in hive table (CDP)

Expert Contributor

Hi,

 

We are unable to insert data into hive table, do not see any error in hive / hive on tez logs. Upon trying to insert data it just sits and does nothing.

 

0: jdbc:hive2://MY_SERVER.com:218> insert into test_table values(1,'aaa');
INFO  : Compiling command(queryId=hive_20221223201916_92c0b5ff-fa62-4f28-afb4-0dd88d76c2d8): insert into test_table values(1,'aaa')
INFO  : Semantic Analysis Completed (retrial = false)
INFO  : Created Hive schema: Schema(fieldSchemas:[FieldSchema(name:col1, type:int, comment:null), FieldSchema(name:col2, type:string, comment:null)], properties:null)
INFO  : Completed compiling command(queryId=hive_20221223201916_92c0b5ff-fa62-4f28-afb4-0dd88d76c2d8); Time taken: 0.371 seconds
INFO  : Executing command(queryId=hive_20221223201916_92c0b5ff-fa62-4f28-afb4-0dd88d76c2d8): insert into test_table values(1,'aaa')
INFO  : Query ID = hive_20221223201916_92c0b5ff-fa62-4f28-afb4-0dd88d76c2d8
INFO  : Total jobs = 1
INFO  : Launching Job 1 out of 1
INFO  : Starting task [Stage-1:MAPRED] in serial mode

 

Cloudera Manager 7.6.1 / Cloudera Runtime 7.1.7

 

Appreciate any assistance  in resolving this.

 

Thanks 

Wert

 

1 ACCEPTED SOLUTION

Expert Contributor

@wert_1311 In CDP hive.server2.tez.initialize.default.sessions is set to true by default, that means when Hiveserver2 starts then applucation master also starts. By defalt the number of AM is 1, so the parallelism does not exists,one Tez job has to wait until other is finished.

 

Navigate to CM ==> Hive on Tez ==> COnfigs ==> Safety valve for Hiveserver2 hive-site.xml

 

Add hive.server2.tez.initialize.default.sessions= false

 

Restart and check

 

Please accept as SOlution, if the action plan has worked.

View solution in original post

3 REPLIES 3

Rising Star

@wert_1311 Could you please confirm if you are using ranger. If yes check the ranger audits. 

I would also suggest you to tail -f while inserting data to the hive server logs to get more information.

Expert Contributor

@wert_1311 In CDP hive.server2.tez.initialize.default.sessions is set to true by default, that means when Hiveserver2 starts then applucation master also starts. By defalt the number of AM is 1, so the parallelism does not exists,one Tez job has to wait until other is finished.

 

Navigate to CM ==> Hive on Tez ==> COnfigs ==> Safety valve for Hiveserver2 hive-site.xml

 

Add hive.server2.tez.initialize.default.sessions= false

 

Restart and check

 

Please accept as SOlution, if the action plan has worked.

Expert Contributor

@asish Thanks!!! that worked.