行业知识
Hbase解决ERROR: KeeperErrorCode = ConnectionLoss for /hbase/master报错
2026-12-06 21:00:00
来源:互联网转载
1、在单机模式中,要先修改一个文件:/usr/local/hbase/conf/hbase-site.xml
hbase-site.xml内容:
hbase.rootdir file:///usr/local/hbase/hbase-tmp
保存运行
start-hbase.shhbase shell
报错
报错原因:可能是因为之前启动过hadoop,然后里面/usr/local/hbase/hbase-tmp有hbase.id不一致的原因导致的
解决办法:将之前的hbase-site.xml的内容修改为
hbase.rootdir file:///usr/local/hbase/hbase-tmp1
成功运行
hbase基础命令
#创建表:create '表名','字段1','字段n'#查看数据库中已创建的表list#添加数据put 'student','95011',Sname','Li'#查看数据get 'student','95011'#查看全部数据scan 'student#删除数据(删除学号为95001的所有Sname字段delete 'student','95001','Sname'#删除表:第一步,让表不可用,第二步,删除disable 'student'drop 'student'
下一篇:怎么看服务器负载?