我使用的是一个VM,其zookeeper.znode.rootserver Cloudera不是HBase版本的默认值(0.98)。
当我尝试连接到HBase时,我的java客户端不会影响zookeeper.znode.rootserver的值。
Configuration conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", "hbaseip");
conf.set("hbase.zookeeper.property.clientPort", "2181");
conf.set("zookeeper.znode.parent", "/hbase");
conf.set("zookeeper.znode.rootserver", "root-region-server");
HTable table = new HTable(conf, "mytable");
table.exists(new Get(Bytes.toBytes("test")));
或者使用hbase-site.xml:
<property>
<name>hbase.zookeeper.quorum</name>
<value>hbaseip</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase</value>
</property>
<property>
<name>zookeeper.znode.rootserver</name>
<value>root-region-server</value>
</property>
当我发布时,我有:
connection-0x1dcbdd11-0x148cd2220550084, quorum=hbaseip:2181, baseZNode=/hbase
Unable to get data of znode /hbase/meta-region-server because node does not exist (not an error)
谢谢...