配置hbase+zookeeper时遇到的问题

今天在配置hbase+zookeeper时遇到了问题,使用list和create语句时没有问题,但是使用put语句一直报错:
put ‘students’, ‘stud003’, ‘info:name’, ‘Tom’
2019-03-09 13:39:08,238 ERROR [main] client.AsyncProcess: Failed to get region location
org.apache.hadoop.hbase.client.NoServerForRegionException: No server address listed in hbase:meta for region students,1552108739539.23f6a3aed5b74cc07c3544bca5df5c71. containing row stud003



我之前搭建zookeeper时使用了4台机器,所以hbase中也是配置了四台,配置完zookeeper时也没有全部检查,后来使用zkServer status 查看zookeeper状态后发现有一台机器没有连接到集群上。
Using config: /root/training/zookeeper-3.4.10/bin/…/conf/zoo.cfg
Error contacting service. It is probably not running.
索性改为使用奇数台配置。
更改完成后就能正常put了。
hbase(main):002:0> put ‘students’,‘stu001’,‘info:age’,‘28’
0 row(s) in 0.1890 seconds

hbase(main):003:0> list
TABLE
students
1 row(s) in 0.0070 seconds

=> [“students”]
hbase(main):004:0> scan ‘students’
ROW COLUMN+CELL
stu001 column=info:age, timestamp=1552113209322, value=28
1 row(s) in 0.0290 seconds

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值