我正在运行 hbase 和 hadoop hdfs 集群(3 个节点,同时运行 hadoop 和 hbase)。它们是hadoop-3.2.2和hbase-2.3.6和jdk 11.0.14,并且不稳定。升级到hadoop-3.3.3和hbase-2.4.9,jdk 11.0.15后,我想用命令检查Hbase本机扩展:
su - hbase -c 'hbase org.apache.hadoop.util.NativeLibraryChecker'
我收到以下警告:
[root@node101:~]#su - hbase -c 'hbase org.apache.hadoop.util.NativeLibraryChecker'
2022-06-06 17:47:32,221 INFO [main] bzip2.Bzip2Factory: Successfully loaded & initialized native-bzip2 library system-native
2022-06-06 17:47:32,224 INFO [main] zlib.ZlibFactory: Successfully loaded & initialized native-zlib library
2022-06-06 17:47:32,231 WARN [main] lz4.Lz4Compressor: java.lang.UnsatisfiedLinkError: 'void org.apache.hadoop.io.compress.lz4.Lz4Compressor.initIDs()'
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'java.lang.String org.apache.hadoop.io.compress.lz4.Lz4Compressor.getLibraryName()'
at org.apache.hadoop.io.compress.lz4.Lz4Compressor.getLibraryName(Native Method)
at org.apache.hadoop.io.compress.Lz4Codec.getLibraryName(Lz4Codec.java:73)
at org.apache.hadoop.util.NativeLibraryChecker.main(NativeLibraryChecker.java:109)
java --版本
openjdk 11.0.15 2022-04-19 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.15+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+10-LTS, mixed mode, sharing)
hadoop-env.sh 在 3 个节点上:
grep "^[^#;]" /opt/hadoop/etc/hadoop/hadoop-env.sh
export HADOOP_OS_TYPE=${HADOOP_OS_TYPE:-$(uname -s)}
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))
export HADOOP_CONF_DIR="/opt/hadoop/etc/hadoop/"
export HADOOP_PID_DIR="/var/run/hadoop"
export HADOOP_LOG_DIR="/var/log/hadoop"
hbase-env.sh:
grep "^[^#;]" /opt/hbase/conf/hbase-env.sh
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))
export HBASE_OPTS="$HBASE_OPTS -Djava.library.path=/opt/hadoop/lib/native"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xms1G -Xmx3G -XX:MaxDirectMemorySize=4G"
export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.host=127.0.0.1 -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=127.0.0.1"
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102"
export HBASE_PID_DIR=/opt/hbase
export HBASE_MANAGES_ZK=false
export HBASE_LOG_DIR=/var/log/hbase
您能帮我知道是什么原因造成的吗? 我是系统管理员,在编码方面没有太多经验。
谢谢,祝你有美好的一天 文生 LE
您使用的HBase版本与Hadoop-3.x不兼容,请使用Hadoop 3.x兼容版本。它们在 HBase 下载页面上带有 -hadoop-3 后缀,例如: https://www.apache.org/dyn/closer.lua/hbase/2.6.0/hbase-2.6.0-hadoop3-bin.tar.gz
Hadoop User ML 上的类似案例: https://lists.apache.org/thread/vh4qoz092cs4thh3zyfz2k2m08okxm9h