How to eliminate the two warnings of starting hive

chnhbhndchngn 2022-02-13 08:18:09 阅读数:939

eliminate warnings starting hive

install hadoop and hive after , start-up hive There are so many warnings when you are , It doesn't affect the operation of the program , But it doesn't look good . 

The first is that I didn't find 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)

The screenshot is

  That means we didn't find HBASE Installation path for , Just install hbase( Even if not ), Then add... To the configuration file HBASE The environment variable of , Even Buzhuang HBASE

stay /etc/profile Add... At the end of

export HBASE_HOME=/opt/module/hbase
export PATH=$PATH:$HBASE_HOME/bin

then source  /etc/profile that will do

The second is about the log

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]

The screenshot is :

  This is because hive and hadoop The log package in conflicts , We delete hive The log package in

First of all to enter hive Of the installation path of lib In file I am here  opt/module/hive/lib

Then delete  log4j-slf4j-impl-2.10.0.jar

Of course, delete the newly installed hbase Log package in , Get into  /opt/module/hbase/lib

then  rm -rf slf4j-log4j12-1.7.25.jar

After completing the above two steps , Restart hive Pictured :

 

 

copyright:author[chnhbhndchngn],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130818074357.html