天天看點

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

[[email protected] ~]# 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

顯示結果:[[email protected] ~]# 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>

運作成功!

繼續閱讀