HBase 0.92 SLF4J Bindings

I installed HBase 0.92 on Hadoop 1.0.0 and it works fine in full size mode, but an annoying warning appears. How can I get rid of it?

  ....... hbase(main):001:0> status SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/hbase-0.92.0/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/hadoop-1.0.0/lib/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] : See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 3 servers, 0 dead, 0.6667 average load ....... 

PS I did not set the $CLASSPATH variable in hbase-env.sh . I start Hadoop with start-all.sh , then I start HBase with start-hbase.sh .

+4
source share
2 answers

I deleted slf4j-log4j12-1.5.8.jar in ${hase}/lib/ , after which the warning no longer showed up. This should be due to loading the duplicated class, and hadoop and hbase use the same jar in the same jvm .

You can try.

+12
source

The warning issued by SLF4J is just a warning. Even if multiple bindings are present, SLF4J selects one log structure / implementation and communicates with it. The SLF4J method selects the binding defined by the JVM and should be considered random for all practical purposes. Starting with version 1.6.6, SLF4J will name the framework / implementation class to which it is actually linked.

Embedded components, such as libraries or frameworks, should not declare dependency on any SLF4J binding, but depend only on slf4j-api. When a library declares a compile-time dependency on an SLF4J binding, it imposes that binding on the end user, thereby negating the purpose of SLF4J. When you encounter an embedded component declaring the compilation time to be dependent on any SLF4J binding, please take a moment to contact the authors of the specified component / library and ask them to fix their paths.

0
source

Source: https://habr.com/ru/post/1397784/


All Articles