Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing Hive Execution Jar: /usr/local/hadoop/hive/lib/hive-exec-*.jar

I have Hadoop 1.0.4 running on a single node cluster set up on my Ubuntu machine.

I did the following steps to download and install the hive release

> svn co http://svn.apache.org/repos/asf/hive/trunk hive    
> cd hive

My hadoop install folder is $HADOOP_HOME/hive and $HADOOP_HOME=/usr/local/hadoop. I set both the environment variables in .bashrc under /home/hduser which is my Hadoop user and the $JAVA_HOME as well.

export HADOOP_HOME=/usr/local/hadoop

export HIVE_HOME=$HADOOP_HOME/hive

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

I have also added the bin folder of both hadoop and hive in my $PATH variable as follows

export PATH=$PATH:$HADOOP_HOME/bin    
export PATH=$HIVE_HOME/bin:$PATH

But while running hive from CLI, I am getting the below error.

hduser@somnath-laptop:/usr/local/hadoop/hive$ bin/hive    
Missing Hive Execution Jar: /usr/local/hadoop/hive/lib/hive-exec-*.jar

Should I download this jar and add it to the /lib/ or is there some hive-specific environment variables that I need to configure. Any suggestion would be very helpful.

like image 485
somnathchakrabarti Avatar asked Apr 14 '13 20:04

somnathchakrabarti


2 Answers

I resolved the problem myself but not sure what exactly happened.

By following the process I mentioned in my original question, I created the $HADOOP_HOME/hive but it was giving me a missing jar error.

So, what I did was: I downloaded hive-0.10.0.tar.gz and extracted it under $HADOOP_HOME. So the newly created folder was $HADOOP_HOME/hive-0.10.0.

I copied the entire lot of jars under $HADOOP_HOME/hive-0.10.0/lib to $HADOOP_HOME/hive/lib and when I executed next,

$HADOOP_HOME/hive> bin/hive

It worked! Please note my $HIVE_HOME=$HADOOP_HOME/hive and $HIVE_HOME/bin is added to path. Hope this helps somebody facing similar problem.

like image 192
somnathchakrabarti Avatar answered Oct 02 '22 08:10

somnathchakrabarti


The tar file apache-hive-0.13.1-src.tar.gz has a missing lib folder You can download hive-0.12.0.tar.gz and move the lib folder to apache-hive-0.13.1-src folder. Now hive should be working.

like image 30
Mohan Avatar answered Oct 02 '22 09:10

Mohan