最近在学习HBase,安装好后使用shell命令时遇到一个奇怪的问题,如下:
The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
上网搜了半天,也没个确切的解决方案,后来我发现需要将/conf/hbase-env.sh 中的 export HBASE_MANAGES_ZK=true 设置一下。
并且需要在启动HBase之前必须将HDFS启动才能成功,即启动hadoop就可以了。
(hadoop) bin/start-all.sh
(hbase) bin/start-hbase.sh