hive Missing Hive Execution Jar:

2019-04-18 12:44 

版权声明:本文为博主原创文章,欢迎诸位分享交流 https://blog.csdn.net/xiaoshunzi111/article/details/51094992

[root@master ~]# hive

Missing Hive Execution Jar: /root/hive/hive/lib/hive-exec-*.jar

运行hive时显示Missing Hive Execution Jar: /usr/hive/hive-0.11.0/bin/lib/hive-exec-*.jar

细细分析这个目录/bin/lib,在hive安装文件夹中这两个目录是并列的,而系统能够找到这样的链接,说明hive在centos系统配置文件中的路径有误,打开 /etc/profile会发现hive的配置路径

修改前:

#HIVE
export HIVE_HOME=$PWD/hive
export PATH=$PATH:$HIVE_HOME/bin

明显可以看出是路径配置的问题,这样的配置系统会在hive安装文件夹中的bin目录下寻找它所需要的jar包,而bin和lib文件夹是并列的,所以我们需要在centos系统配置文件中将hive路径配置为文件夹安装路径,即

修改后:

#HIVE
export HIVE_HOME=$PWD/hive
export PATH=$JAVA_HOME/bin:$PATH:$HIVE_HOME/bin

显示结果:[root@master ~]# hive
16/04/08 07:24:12 INFO Configuration.deprecation: mapred.input.dir.recursive is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.recursive
16/04/08 07:24:12 INFO Configuration.deprecation: mapred.max.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.maxsize
16/04/08 07:24:12 INFO Configuration.deprecation: mapred.min.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize
16/04/08 07:24:12 INFO Configuration.deprecation: mapred.min.split.size.per.rack is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.rack
16/04/08 07:24:12 INFO Configuration.deprecation: mapred.min.split.size.per.node is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.node
16/04/08 07:24:12 INFO Configuration.deprecation: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
16/04/08 07:24:12 INFO Configuration.deprecation: mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative
16/04/08 07:24:12 WARN conf.HiveConf: DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.

Logging initialized using configuration in jar:file:/root/hive/lib/hive-common-0.12.0-cdh5.0.0.jar!/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/hive/lib/slf4j-log4j12-1.7.5.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]
hive>

运行成功!

发表评论

您必须 登录 才能发表留言!