Hbase踩坑记

2019-04-09  本文已影响0人  请不要问我是谁

安装版本

Hbase版本 2.1.4
Hadoop版本 2.9

异常

java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper operation during component failures, but the underlying filesystem does not support doing so. Please check the config value of 'hbase.procedure.store.wal.use.hsync' to set the desired level of robustness and ensure the config value of 'hbase.wal.dir' points to a FileSystem mount that can provide it.

hbase-site.xml增加配置

<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>

ERROR: KeeperErrorCode = NoNode for /hbase/meta-region-server

ERROR: KeeperErrorCode = NoNode for /hbase/master

检查配置,检查zookeeper是否正常
解决:删除zookeeper下的/habse rmr /habse
删除hbase.zookeeper.property.dataDir 默认为/tmp/habse-{hostname}
删除hdfs中的hbase hadoop dfs -rm -r /hbase

Java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hbase.io.asyncfs.FanOutOneBlockAsyncDFSOutputHelper

hbase-site.xml增加配置

<property>
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>

java.lang.NoClassDefFoundError: org/apache/htrace/SamplerBuilder

添加旧版本的htrace-core-3.1.0-incubating.jar,可以从旧版本的hbase的lib中拷贝到当前版本的hbase lib。

hbase-env.sh配置

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HBASE_CLASSPATH=/usr/local/hadoop/etc/hadoop
export HBASE_MANAGES_ZK=false

hbase-site.xml配置

<configuration>
    <property>
                <name>hbase.rootdir</name>
                <value>hdfs://localhost:9000/hbase</value>
        </property>
    <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
    </property>
    <property> 
        <name>hbase.unsafe.stream.capability.enforce</name> 
        <value>false</value> 
    </property>
    <property>
        <name>hbase.wal.provider</name>
        <value>filesystem</value>
    </property>
    <property> 
        <name>hbase.zookeeper.property.clientPort</name> 
        <value>2181</value> 
    </property> 
    <property> 
        <name>hbase.zookeeper.quorum</name> 
        <value>localhost:2181</value> 
    </property>
</configuration>
上一篇 下一篇

猜你喜欢

热点阅读