Support Questions

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

Hive CLI issue when killing with Ctrl+c

avatar
Guru

I am running HPD 2.4.0.0 installed with Hive 1.2. If I exit the Hive CLI using Ctrl+c, then try to run Hive again immediately, it takes about 10 minutes for the Hive prompt to appear. It just hangs right here:

root@node1 bin # hive
WARNING: Use "yarn jar" to launch YARN applications.
Logging initialized using configuration in file:/etc/hive/conf/hive-log4j.properties

Any thoughts on why this may be occurring?

BTW, if I exit Hive using the "exit;" command, everything is fine and I can startup Hive again right away with no issues.

1 ACCEPTED SOLUTION

avatar
Expert Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
7 REPLIES 7

avatar
Expert Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Guru

Thanks - this is exactly what is happening. FYI: I think it also affecting Pig. Is there a way to set the timeout to be a much shorter value?

avatar
Master Guru

@Rich Raposa - In addition to what @Takahiko Saito said, you can verify this thing by running hive terminal as:

hive --hiveconf hive.execution.engine=mr

Do ctrl+c

It should not take time to come out as we are using "mr" execution engine.

Hope this information helps.

avatar
Explorer

I too got same issue and resolved by doing hive --hiveconf hive.execution.engine=mr . But, how to resolve it if we want to use Tez instead of mr ?

avatar
Expert Contributor

@rich

as given by @Kuldeep Kulkarni and @Takahiko Saito it launches an YARN appllication when the default execution engine of HIVE is TEZ, and starts waiting for the resources if the Queue is fully occupied and no more resources available.

@gvenkatesh if you want to continue with TEZ we can do the below to work around the issue (only workaround as it is related to resource limitation of the YARN)

1) Increase the MAX queue capacity

2) Increase the User limitfactor to be more than 1

3) we can reduce the minimum container size 512MB with that we will have an option to launch more containers (note: this needs to be considered based on cluster usage)

avatar
Explorer

Thank you.

avatar
Rising Star

One hack would be to kill the yarn application for a faster resource reclaim, retrieving the appid from RM UI

yarn application -kill <appid>