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

hive install and configuration

hive install and configuration


Hi Team,

I am trying to get Hive running on standalone Hadoop Cluster (manual install not Ambari). Hadoop is installed fine and when I do jps I can see the namenode, datanode, nodemanager, resourcemanager, secondarynamenode all running and I can connect using localhost:50070 & localhost:8088.

Hadoop version is 1.0.3 (HDP 2.7.2)

I have hive version 1.2.1 and am trying to run hive. I get

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/ql/CommandNeedRetryException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName( at at org.apache.hadoop.util.RunJar.main( Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.ql.CommandNeedRetryException at$ at$ at Method) at at java.lang.ClassLoader.loadClass( at java.lang.ClassLoader.loadClass( ... 4 more

I have added the in the

export HADOOP_CLASSPATH=${HBASE_LIBS}:${HBASE_CONF}:/usr/local/hadoop/hive/lib/*.jar:${HADOOP_CLASSPATH}

(tried combination of having ${HADOOP_CLASSPATH} at beginning. Tried /hive/lib/*.jar with /hive/lib/*.Also, tried adding individual .jar files /usr/local/hadoop/hive/lib/hive-common-1.2.1.jar:/usr/local/hadoop/hive/lib/hive-cli-1.2.1.jar:/usr/local/hadoop/hive/lib/hive-exec-1.2.1.jar:/usr/local/hadoop/hive/lib/hive-service-1.2.1.jar:/usr/local/hadoop/hive/lib/jline-2.12.jar

but still I get the error. I read on forums that its mainly to do with HADOOP CLASSPATH.

Any help/suggestions appreciated.


Anil Khiani


Re: hive install and configuration

You shouldn't need Hive libs in Hadoop classpath. Here are a few examples of setting HIVE_HOME and other variables.

You can see the configurations used in an automated install by downloading the client configs from a Hortonworks HDP Sandbox VM and by starting Hive and viewing the information dialog in Ambari.



Re: hive install and configuration


Thanks Andrew. Much helpful.