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

hive shell won't do anything

Solved Go to solution
Highlighted

hive shell won't do anything

Contributor

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

Accepted Solutions

Re: hive shell won't do anything

Contributor

I restarted ambari server and it is now working again.

View solution in original post

5 REPLIES 5
Highlighted

Re: hive shell won't do anything

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.

Highlighted

Re: hive shell won't do anything

Contributor

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

Highlighted

Re: hive shell won't do anything

@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

Highlighted

Re: hive shell won't do anything

Contributor

@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]$

Re: hive shell won't do anything

Contributor

I restarted ambari server and it is now working again.

View solution in original post