Support Questions

Find answers, ask questions, and share your expertise

Tez session hasn't been created yet. Opening session

avatar
Contributor

Hello,

I'm trying to do an export table to a file using beeline.

jdbc:hive2://servername> INSERT OVERWRITE LOCAL DIRECTORY '/tmp/custorder' select * from custorder;

But the operation is stop with : Tez session hasn't been created yet. Opening session for a very long time.

Actually, nothing happend even after one hour.

Can someone help me on this issue?

Thank very much.

Best regards,

Daniela

1 ACCEPTED SOLUTION

avatar
@Daniela Boamba

Can you try running the insert query after changing execution engine to mr?

set hive.execution.engine=mr;

Thanks and Regards,

Sindhu

View solution in original post

13 REPLIES 13

avatar

If YARN cluster dont have capacity to launch AM then Hive CLI waits indefinitely to launch an AM. Tez have its own optimization step where it pre-allocate resources saving the user the overhead of launching a AM everytime a new query launch from same session. But when it lanches using mr it dont have any condition called preallocate and works successfully.

avatar
Contributor

HI Rodgers,

Please find bellow the result of the command :

[spark@servername ~]$ yarn application -list 16/07/08 07:04:34 INFO impl.TimelineClientImpl: Timeline service address: http://servername:8188/ws/v1/timeline/ 16/07/08 07:04:34 INFO client.RMProxy: Connecting to ResourceManager at servername/ip:8050 Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED, RUNNING]):5 Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL application_1467377616814_0001 SparkSQL::servername SPARK spark default RUNNING UNDEFINED 10% http://servername:4040 application_1467377616814_0007 HIVE-701d4281-08f4-4bc4-aab3-724c931fc606 TEZ spark default ACCEPTED UNDEFINED 0% N/A application_1467377616814_0005 HIVE-55924703-c794-413f-8df0-fbb464b48885 TEZ spark default ACCEPTED UNDEFINED 0% N/A application_1467377616814_0010 HIVE-9ef8ceda-b31f-4311-8b4a-288b5f476e93 TEZ hive2 default ACCEPTED UNDEFINED 0% N/A application_1467702596252_0002 HIVE-a549f4eb-ab4c-4f57-a180-3e573160b9d9 TEZ hive2 default ACCEPTED UNDEFINED 0% N/A

thank you very much.

Best regards,

daniela

,

Hi Rodgers,

please find bellow the result of the yarn application -list

[spark@servername ~]$ yarn application -list 16/07/08 07:04:34 INFO impl.TimelineClientImpl: Timeline service address: http://servername:8188/ws/v1/timeline/ 16/07/08 07:04:34 INFO client.RMProxy: Connecting to ResourceManager at servername/10.208.159.170:8050 Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED, RUNNING]):5 Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL application_1467377616814_0001 SparkSQL::servername SPARK spark default RUNNING UNDEFINED 10% http://servername:4040 application_1467377616814_0007 HIVE-701d4281-08f4-4bc4-aab3-724c931fc606 TEZ spark default ACCEPTED UNDEFINED 0% N/A application_1467377616814_0005 HIVE-55924703-c794-413f-8df0-fbb464b48885 TEZ spark default ACCEPTED UNDEFINED 0% N/A application_1467377616814_0010 HIVE-9ef8ceda-b31f-4311-8b4a-288b5f476e93 TEZ hive2 default ACCEPTED UNDEFINED 0% N/A application_1467702596252_0002 HIVE-a549f4eb-ab4c-4f57-a180-3e573160b9d9 TEZ hive2 default ACCEPTED UNDEFINED 0% N/A

Thank you,

Daniela

avatar
Rising Star

If you could kill all of those processes (if your cluster will allow) and try running again. It looks like a lot of Tez resources are busy and thus could be why you are experiencing the hanging. If not you may need to look into YARN Queue Manager

avatar
New Contributor

I have the same issue with you.

I solved it by modifying the following..

reduce Tez config : tez.am.resource.memory.mb =256

default 2048 .

and Increase Yarn : Memory allocated for all YARN containers on a node 。

I guess on hive cli use Tez need {tez.am.resource.memory.mb} memory . when {Memory allocated for all YARN containers on a node} no have enough memory . Then Application-id is hang.