启动hive的两条警告怎么消除

安装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 如图:

 

 

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>