运行Hbase shell时报错:
hbase(main):006:0> list
TABLE
ERROR: Can't get master address from ZooKeeper; znode data == null
Here is some help for this command:
List all tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:
hbase> list
hbase> list 'abc.*'
hbase> list 'ns:abc.*'
hbase> list 'ns:.*'
原因:运行hbase(zookeeper)的用户无法写入zookeeper文件,导致znode data为空
解决如下:
格式化hdfs 进入Hadoop/bin 目录下 : ./hadoop namenode –format
启动 zookeeper
启动 hadoop
启动 hbase
进入hbase shell 成功
查看zookeeper中的server.2=hadoop100:2888:3888