安裝hadoop 和hive后,啟動hive的時候經常會有這么幾條警告, 倒是不影響程式的運行, 但是看著讓人很不爽.
第一條就是說沒有找到hbase balabala....
which: no hbase in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/module/jdk1.8.0/bin:/opt/module/hadoop-3.1.3/bin:/opt/module/hadoop-3.1.3/sbin:/opt/module/hive/bin:/opt/module/zookeeper-3.5.7/bin:/opt/module/kafka-2.4.1/bin:/opt/module/eagle-1.4.5/bin:/opt/module/sqoop-1.4.6/bin:/opt/module/spark/bin:/opt/module/spark/sbin:/opt/module/jdk1.8.0/bin:/opt/module/hadoop-3.1.3/bin:/opt/module/hadoop-3.1.3/sbin:/home/xm/.local/bin:/home/xm/bin)
截圖就是

這就是說沒有找到HBASE的安裝路徑, 只要安裝hbase(即使不用), 然后在組態檔中添加了HBASE的環境變數即可, 即使布莊HBASE
在/etc/profile中最后添加
export HBASE_HOME=/opt/module/hbase
export PATH=$PATH:$HBASE_HOME/bin
然后source /etc/profile 即可
第二條就是關于日志的問題
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/module/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.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.apache.logging.slf4j.Log4jLoggerFactory]
截圖就是:

這是因為hive和hadoop中的日志包沖突了, 我們洗掉hive中的日志包即可
首先進入hive的安裝路徑的lib檔案中 我這里是 opt/module/hive/lib
然后洗掉 log4j-slf4j-impl-2.10.0.jar

當然也要洗掉新安裝的hbase中的日志包, 進入 /opt/module/hbase/lib
然后 rm -rf slf4j-log4j12-1.7.25.jar
完成上面的兩步后, 重新啟動hive 如圖:

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/392310.html
標籤:其他
下一篇:什么是嵌入式作業系統?
