hbase部署經驗與坑總結

1.本地單機部署hbase,想要使用獨立zookeeper,不使用自帶的java

vim conf/hbase-env.shshell

export HBASE_MANAGES_ZK=falsevim

設置不使用自帶zookeeper,這一步設置完按理說就能夠使用獨立的zookeeper程序了,可是老是報錯:api

Could not start ZK at requested port of 2181.  ZK was started at port: 2182.  Aborting as clients (e.g. shell) will not be able to find this ZK quorum.ide

很明顯,這是啓動自帶zookeeper與獨立zookeeper衝突了this

 

很疑惑,明明設置不啓動自帶zookeeper了,爲何仍是去啓動了,後來上網查詢才知道,把hbase.cluster.distributed設置爲false,也就是讓hbase以standalone模式運行時,依然會去啓動自帶的zookeeperidea

因此要作以下設置,值爲truespa

vim conf/hbase-site.xmlcode

<property>component

 <name>hbase.cluster.distributed</name>

<value>true</value> 

</property>

 

2.idea javaapi 鏈接本地hbase超時

hbase-site.xml增長配置

<property>
<name>hbase.master.ipc.address</name>
<value>0.0.0.0</value>
</property>
<property>
<name>hbase.regionserver.ipc.address</name>
<value>0.0.0.0</value>
</property>

3.以下異常

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>

相關文章
相關標籤/搜索