一. Region在Meta信息完整,Regioninfo文件丢失
1.异常定位
全局检查
hbck -details testorphan1
ERROR: Orphan region in HDFS: Unable to load .regioninfo from table testorphan1 in hdfs dir hdfs://hadoop01:9000/hbase/data/default/testorphan1/031355e76d2c8550196eb3284b25a4a6! It may be an invalid format or version file. Treating as an orphaned regiondir.
19/06/05 14:42:56 WARN util.HBaseFsck: Failed to read .regioninfo file for region testorphan1,100,1559716712083.031355e76d2c8550196eb3284b25a4a6.
HDFS检查
hbck -details检查,如果没有Unable to read .tableinfo from " + hbaseRoot + "/" + tableName异常
hbase hbck -fixTableOrphans "testorphan1"
ERROR: Orphan region in HDFS: Unable to load .regioninfo from table testorphan1 in hdfs dir hdfs://hadoop01:9000/hbase/data/default/testorphan1/031355e76d2c8550196eb3284b25a4a6! It may be an invalid format or version file. Treating as an orphaned regiondir.
19/06/05 14:45:12 WARN util.HBaseFsck: Failed to read .regioninfo file for region null
java.io.FileNotFoundException: File does not exist: /hbase/data/default/testorphan1/031355e76d2c8550196eb3284b25a4a6/.regioninfo
ERROR: There is a hole in the region chain between 100 and 200. You need to create a new .regioninfo and region dir in hdfs to plug the hole.
2.确认异常信息
确定031355e76d2c8550196eb3284b25a4a6的meta信息
检查meta表 Meta确定缺失031355e76d2c8550196eb3284b25a4a6在meta是否存在
scan 'hbase:meta', FILTER=>"RowFilter(=,'substring:031355e76d2c8550196eb3284b25a4a6')"
Region的Meta信息完好,可以断定hole是由regioninfo文件丢失导致。
在页面确定Rs信息
这种就是只有regioninfo丢失
3. 修复
Assign region
assign '031355e76d2c8550196eb3284b25a4a6'
确认有问题regioninfo '031355e76d2c8550196eb3284b25a4a6'
./hbase wck -source default:testorphan1 -option checkTable
4. 检查
Hbck -details
————————————————
版权声明:本文为CSDN博主「shfshihuafeng」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/shfshihuafeng/article/details/90734595