SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.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] HBase 2.4.10 Source code repository git://buildbox/home/apurtell/build/hbase revision=3e5359c73d1a96dd7d2ac5bc8f987e9a89ef90ea Compiled by apurtell on Mon Feb 28 10:03:15 PST 2022 From source with checksum b38d895e719d82c3d3b2a886e3fca39f754f5ceef732e157604c905c7af3af2d4b9b861abfdd270e627a4fe1ffa8eba74a9b01095b856952d18023666cce66ad
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.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] HBase Shell Use "help" to get list of supported commands. Use "exit" to quit this interactive shell. For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell Version 2.4.10, r3e5359c73d1a96dd7d2ac5bc8f987e9a89ef90ea, Mon Feb 28 10:03:15 PST 2022 Took 0.0012 seconds hbase:001:0>
# Tell HBase whether it should include Hadoop's lib when start up, # the default value is false,means that includes Hadoop's lib. export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP="true"
再启动一次HBase试试:
1 2
start-dfs.sh start-hbase.sh
然后我看到了这串输出:
1 2 3
127.0.0.1: running zookeeper, logging to /usr/local/hbase/bin/../logs/hbase-hadoop-zookeeper-ubuntu.out running master, logging to /usr/local/hbase/bin/../logs/hbase-hadoop-master-ubuntu.out : regionserver running as process 8770. Stop it first.
no hbase master found 127.0.0.1: running zookeeper, logging to /usr/local/hbase/bin/../logs/hbase-hadoop-zookeeper-ubuntu.out 127.0.0.1: stopping zookeeper.
2022-03-28 12:18:51,591 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable HBase Shell Use "help" to get list of supported commands. Use "exit" to quit this interactive shell. For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell Version 2.4.10, r3e5359c73d1a96dd7d2ac5bc8f987e9a89ef90ea, Mon Feb 28 10:03:15 PST 2022 Took 0.0013 seconds hbase:001:0>
此时退出shell,再输入hbase version命令,也没有那串warning了。
1 2 3 4
HBase 2.4.10 Source code repository git://buildbox/home/apurtell/build/hbase revision=3e5359c73d1a96dd7d2ac5bc8f987e9a89ef90ea Compiled by apurtell on Mon Feb 28 10:03:15 PST 2022 From source with checksum b38d895e719d82c3d3b2a886e3fca39f754f5ceef732e157604c905c7af3af2d4b9b861abfdd270e627a4fe1ffa8eba74a9b01095b856952d18023666cce66ad
之后正常退出HBase(这次就很快了)和Hadoop即可。本次安装和配置终于完成了😋。
但看着那句新的WARN消息,总觉得不对劲啊,有没有办法去掉它呢?(解决了,方法见下文。)
附:关于“WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable”消息的解决方案。
Let’s presume your Hadoop shipped with a native library that suits the platform you are running HBase on. To check if the Hadoop native library is available to HBase, run the following tool (available in Hadoop 2.1 and greater):
1 2 3 4 5 6 7 8 9
$ ./bin/hbase --config ~/conf_hbase org.apache.hadoop.util.NativeLibraryChecker 2014-08-26 13:15:38,717 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Native library checking: hadoop: false zlib: false snappy: false lz4: false bzip2: false 2014-08-26 13:15:38,863 INFO [main] util.ExitUtil: Exiting with status 1
Above shows that the native hadoop library is not available in HBase context.
To fix the above, either copy the Hadoop native libraries local or symlink to them if the Hadoop and HBase stalls are adjacent in the filesystem. You could also point at their location by setting the environment variable in your hbase-env.sh.LD_LIBRARY_PATH
~$ hbase shell HBase Shell Use "help" to get list of supported commands. Use "exit" to quit this interactive shell. For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell Version 2.4.10, r3e5359c73d1a96dd7d2ac5bc8f987e9a89ef90ea, Mon Feb 28 10:03:15 PST 2022 Took 0.0013 seconds hbase:001:0>