Reputation: 31
I am very new in HBase. I started to work with HBase very recently,In my Ubuntu server Standalone HBase work fine with Zookeeper. However, while I am trying to work with Pseudo-Distributed Local, it's having something strange that I don't understand. I have configured HBase conf/hbase-site.xml according to below:
<name>hbase.cluster.distributed</name>
<value>true</value>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/username/zookeeper/new</value>
And I have setup HDFS for a Single Node Cluster of Pseudo-Distributed Operation. Most tricky part is when I run HBase,ZooKeeper and Hadoop(HDFS) and the "jps" command show the below information.
8998 HRegionServer
8066 ResourceManager
8229 NodeManager
7456 NameNode
7852 SecondaryNameNode
7045 QuorumPeerMain
9269 Jps
8815 HMaster
In addition after executing the "hbase shell" command it ask for the hbase operation. hbase(main):001:0>
However, while I put "list" or create table command, its give
ERROR: Can't get master address from ZooKeeper; znode data == null .
And after exiting from hbase(main):001:0> I see
8998 HRegionServer
8066 ResourceManager
8229 NodeManager
7456 NameNode
9656 Jps
7852 SecondaryNameNode
7045 QuorumPeerMain
Here, 8815 HMaster is disappeared.
I will greatly appreciate if someone help to find a way to solve this problem.
Upvotes: 1
Views: 2189
Reputation: 31
Now it is working fine with the below configuration file. The main problem was with the port number.
<property>
<name>hbase.zookeeper.quorum</name>
<value>127.0.0.1</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2182</value>
</property>
<property>
<name>hbase.master</name>
<value>localhost:60010</value>
</property>
Upvotes: 1
Reputation: 548
Search through your hbase-env.sh file for HBASE_MANAGES_ZK
and make sure it is set to true:
export HBASE_MANAGES_ZK=true
Then head on over to your hbase-site.conf and let it know on which nodes to run Zookeeper (it will show up as some variation of QuorumPeer with jps):
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
If that still doesn't work, try switching localhost
in your conf files to your hostname (making sure it is in your machine's /etc/hosts file).
Upvotes: 1