缺少 Hive 执行 Jar:/usr/local/hadoop/hive/lib/hive-exec-*.jar [英] Missing Hive Execution Jar: /usr/local/hadoop/hive/lib/hive-exec-*.jar
问题描述
我在我的 Ubuntu 机器上设置的单节点集群上运行 Hadoop 1.0.4.
I have Hadoop 1.0.4 running on a single node cluster set up on my Ubuntu machine.
我按照以下步骤下载并安装了 hive 版本
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
我的 hadoop 安装文件夹是 $HADOOP_HOME/hive 和 $HADOOP_HOME=/usr/local/hadoop.我在/home/hduser 下的 .bashrc 中设置了环境变量,这是我的 Hadoop 用户和 $JAVA_HOME.
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
我还在 $PATH 变量中添加了 hadoop 和 hive 的 bin 文件夹,如下所示
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
但是在从 CLI 运行 hive 时,我收到以下错误.
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
我应该下载这个 jar 并将它添加到/lib/或者我需要配置一些特定于 hive 的环境变量.任何建议都会非常有帮助.
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.
推荐答案
我自己解决了问题,但不确定到底发生了什么.
I resolved the problem myself but not sure what exactly happened.
按照我在原始问题中提到的过程,我创建了 $HADOOP_HOME/hive 但它给了我一个缺少 jar 的错误.
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.
所以,我所做的是:我下载了 hive-0.10.0.tar.gz 并将其解压缩到 $HADOOP_HOME 下.所以新创建的文件夹是 $HADOOP_HOME/hive-0.10.0.
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.
我将 $HADOOP_HOME/hive-0.10.0/lib 下的所有 jars 复制到 $HADOOP_HOME/hive/lib 下,然后当我执行时,
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
$HADOOP_HOME/hive> bin/hive
成功了!请注意我的 $HIVE_HOME=$HADOOP_HOME/hive 和 $HIVE_HOME/bin 已添加到路径中.希望这可以帮助面临类似问题的人.
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.
这篇关于缺少 Hive 执行 Jar:/usr/local/hadoop/hive/lib/hive-exec-*.jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!