Skip to main content
wert_1311
Gold ⭐️
December 23, 2022
Solved

Data not inserting in hive table (CDP)

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

 

asish
asishAnswer
Gold ⭐️⭐️⭐️
December 24, 2022

@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.

3 replies

Kartik_Agarwal
Platinum ⭐️
Platinum ⭐️
December 24, 2022

@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.

Translate
asish
Gold ⭐️⭐️⭐️
asishAnswer
Gold ⭐️⭐️⭐️
December 24, 2022

@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.

Translate
wert_1311
wert_1311Author
Gold ⭐️
December 27, 2022

@asish Thanks!!! that worked.

Translate