hbck源码系列(七)--Orphan(hdfs的regioninfo丢失)案例1

一. 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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值