我爱编程

HBase 常见错误修复方法

2017-09-14  本文已影响1272人  eriolchan

在重启HBase Region Server后经常会使用hbase hbck 命令进行检测,有时会检测出一些错误,以下是对于一些常见的错误的处理方法。

1. Found lingering reference file hdfs:...

hadoop dfs -rm hdfs://... (这步可能可以忽略)
hbase hbck -fixReferenceFiles 

2. empty REGIONINFO_QUALIFIER rows

hbase hbck -fixEmptyMetaCells

3. ERROR: There is a hole in the region chain between 28492e79:\x00\x04X\xDE\xEEg and 28f5c280. You need to create a new .regioninfo and region dir in hdfs to plug the hole.

hbase hbck -fixHdfsHole
hbase hbck -fixMeta
hbase hbck -fixAssignments

4. region in transition
只有ERROR 时,才需要执行下面操作

stop hbase cluster (关闭hbase 集群)
hbase zkcli (或者 zookeeper-client -server 10.1.1.10:2181)
rmr /hbase
start hbase cluster (启动hbase 集群,会重新生成/hbase 数据)

总结

hbase hbck -help 能看到所有的帮助命令,根据ERROR 信息基本能搜到对应的关键字,再执行对应的命令即可。
修复完后部分命令需要执行-fixMeta (重新生成hbase meta 信息),然后再执行-fixAssignments (根据meta 表将region 分配给对应的region server) 才生效。

上一篇 下一篇

猜你喜欢

热点阅读