2017-01-02 52 views
2

我想以僞分佈式模式運行hbase,安裝是從頭開始的。
跟着步Zookeeper無法定位hbase僞分佈式模式下的主節點

  1. start HBase。
  2. 啓動HBase的主服務器
  3. 啓動區域服務器
  4. 開始HBase的殼牌
  5. 執行列表

HBase的正常啓動,因此HBase的外殼。 當我檢查動物園管理員,主人以及地區所有服務器都起來了。 對於任何查詢hbase shell提示,我得到這個錯誤。

錯誤 - 無法從ZooKeeper獲取主地址; Z序節點的數據== NULL

code- configuration - 
       hbase-site.xml 
       <configuration> 
        <property> 
         <name>hbase.cluster.distributed</name> 
         <value>true</value> 
        </property> 
        //Here you have to set the path where you want HBase to store its files. 
        <property> 
         <name>hbase.rootdir</name> 
         <value>hdfs://localhost:8030/hbase</value> 
        </property> 
        <property> 
         <name>hbase.zookeeper.property.dataDir</name> 
         <value>/home/hadoop/zookeeper</value> 
        </property> 
       </configuration> 

以上就是我hbase-site.xml配置。
請幫我理解,我失蹤了。

+0

在zookeeper中檢查路徑'/ hbase/master',當錯誤日誌聲明時它是異常的。也許你可以在步驟中添加你執行的確切命令。 –

回答

1

以下屬性需要添加到/ HBase的/ conf文件夾HBase的xml文件:

<property> 
 
<name>hbase.zookeeper.property.clientPort</name> 
 
<value>2222</value> 
 
<description>Property from ZooKeeper's config zoo.cfg. 
 
The port at which the clients will connect. 
 
</description> 
 
</property> 
 
<property> 
 
<name>hbase.zookeeper.property.dataDir</name> 
 
<value>/home/biadmin/my-local-hbase/zookeeper</value> 
 
</property> 
 
<property> 
 
<name>hbase.zookeeper.quorum</name> 
 
<value>bivm</value> 
 
</property>

還需要編輯hbase-env.sh文件。添加正確的JAVA_HOME路徑並取消

export HBASE_MANAGES_ZK=true

這應該可以解決上面的錯誤!

0

你需要設置你的HBase-site.xml中這個屬性,以及:

hbase.zookeeper.quorum 
+0

我把 hbase.zookeeper.quorum 本地主機 逗號在動物園管理員法定人數分隔的服務器列表。 bittu

+0

但錯誤仍然存​​在。 – bittu