Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hive shell won't do anything

avatar
Rising Star

I start the hive shell. it doesn't give me an kind of prompt. I can type away, it echoes what I type but no response:

[hive@sandbox root]$ hive WARNING: Use "yarn jar" to launch YARN applications.

Logging initialized using configuration in file:/etc/hive/2.4.0.0-169/0/hive-log4j.properties select * from truck_mileage; go ^C[hive@sandbox root]$ [hive@sandbox root]$ hive WARNING: Use "yarn jar" to launch YARN applications.

Logging initialized using configuration in file:/etc/hive/2.4.0.0-169/0/hive-log4j.properties hello there anyone home? ; ; ; ;;

1 ACCEPTED SOLUTION

avatar
Rising Star

I restarted ambari server and it is now working again.

View solution in original post

5 REPLIES 5

avatar
Guru

hive shell tries to get one yarn container. If all your yarn containers are busy, then 'hive' can be in hang state until containers are available. Another issue could be hivemetastore not responding.

please paste /tmp/hive/hive.log which can give some insights.

If cluster is busy,

--hiveconf hive.execution.engine=mr

will not wait for getting a container. You can use that and then switch over to tez by setting execution engine again.

avatar
Rising Star

hivelog.txtattached is the hive log. just tried this again and same thing happened. just a nuisance, but the upload refuses to accept files with extension of .log. sigh....

avatar
Master Mentor
@michael klybor

You can access resource manager UI to see existing jobs running.

or

yarn application -list

yarn application -kill appid --> apps dont' need

then try running hive cli

PS: Start using beeline instead of hive cli because of security reasons.

Permanent solution is to enable yarn queues. https://community.hortonworks.com/articles/10912/yarn-queues-and-cs-view-queue-mapping.html

avatar
Rising Star

@Neeraj Sabharwal

thanks. I killed all of the yarn applications and tried again. Both the hive CLI and the ambari hive query editor still hang up. the initial issue (reported separately) was with the ambari hive query:

CREATE TABLE events STORED AS ORC AS SELECT driverid, city, state FROM geolocation;

as per the tutorial. so perhaps the issue is with creating ORC files? and that is hung and cascading back to any hive activity?

All I am doing is trying to follow the tutorial. very frustrating.

here is yarn application list:

^C[hive@sandbox hive]$ yarn application -list 16/05/02 14:38:35 INFO impl.TimelineClientImpl: Timeline service address: http://sandbox.hortonworks.com:8188/ws/v1/timeline/ 16/05/02 14:38:35 INFO client.RMProxy: Connecting to ResourceManager at sandbox.hortonworks.com/10.0.2.15:8050 Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED, RUNNING]):1 Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL application_1461958087140_0034 HIVE-c01d9d1e-b461-4770-822b-b46a7ceeecf2 TEZ hive default RUNNING UNDEFINED 0% http://sandbox.hortonworks.com:44396/ui/ [hive@sandbox hive]$ yarn application -list 16/05/02 14:41:24 INFO impl.TimelineClientImpl: Timeline service address: http://sandbox.hortonworks.com:8188/ws/v1/timeline/ 16/05/02 14:41:24 INFO client.RMProxy: Connecting to ResourceManager at sandbox.hortonworks.com/10.0.2.15:8050 Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED, RUNNING]):2 Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL application_1461958087140_0035 HIVE-caf7b780-54c9-436b-9c90-28bd6db769dd TEZ hive default RUNNING UNDEFINED 0% http://sandbox.hortonworks.com:51481/ui/ application_1461958087140_0034 HIVE-c01d9d1e-b461-4770-822b-b46a7ceeecf2 TEZ hive default RUNNING UNDEFINED 0% http://sandbox.hortonworks.com:44396/ui/ [hive@sandbox hive]$

avatar
Rising Star

I restarted ambari server and it is now working again.