Support Questions

Find answers, ask questions, and share your expertise

Hive CLI unresponsive

avatar

A prospect is experiencing issue with Hive CLI. I know Hive CLI is not a long term solution and beeline is preferred but I am wondering if beeline, Hive View and other front end tools are working, what could cause Hive CLI to not start -

$ hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.0.0-2557/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.0.0-2557/spark/lib/spark-assembly-1.3.1.2.3.0.0-2557-hadoop2.7.1.2.3.0.0-2557.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.0.0-2557/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.0.0-2557/spark/lib/spark-assembly-1.3.1.2.3.0.0-2557-hadoop2.7.1.2.3.0.0-2557.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Logging initialized using configuration in file:/etc/hive/2.3.0.0-2557/0/hive-log4j.properties

1 ACCEPTED SOLUTION

avatar

One thing to check is if they are using tez. If they are, it could be possible that they do not have any capacity on their YARN cluster to launch AM. So the Hive CLI waits indefinitely to launch an AM. One thing they can do to alleviate this is to launch hive cli as "hive -hiveconf hive.execution.engine=mr".

View solution in original post

12 REPLIES 12

avatar
Rising Star

Can you try setting the HiveCLI to startup with DEBUG logging?

e.g.

hive -hiveconf hive.log.file=hivecli_debug.log -hiveconf hive.log.dir=/tmp/hivecli -hiveconf hive.root.logger=DEBUG,DRFA

-Darwin

avatar

One thing to check is if they are using tez. If they are, it could be possible that they do not have any capacity on their YARN cluster to launch AM. So the Hive CLI waits indefinitely to launch an AM. One thing they can do to alleviate this is to launch hive cli as "hive -hiveconf hive.execution.engine=mr".

avatar

Hey Deepesh, thanks for the answer.. I am wondering why would MR get resources and not Tez?

avatar

Its not that MR gets resources, Tez just pre-allocates resources, it starts a YARN application as soon as you invoke the Hive CLI. In case of MR a YARN application is launched only when its required by the executing query. This is a performance optimization in Hive on Tez saving the user the overhead of launching a AM everytime a new query is run in the same Hive CLI session.

avatar
Super Collaborator

This was helpful for me

avatar
Expert Contributor

Hint: If you are on HDP 2.2, I have seen similar issue .

The issue arises immediately after a configuration change is set using ambari. Beeline would then connect fine, but the Hive CLI will hang. This would then appear to the customer as being introduced by ambari .

Rolling back the change in ambari fixes the issue, but then setting a new configuration is blocked.

avatar

Can you shed more details on what type of configuration change was applied using Ambari that triggered the hive cli hang?

avatar
Master Mentor

@bsaini@hortonworks.com

I would start with queues. Have your configures Yarn Queues to have multiple job? Please check if there are any other jobs. By default, if there is one long job running then Hive CLI wont respond back until the running job finishes.

avatar
New Contributor

I am new to hadoop . I have the same issue .Can anyone help me .