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

原文鏈接:https://blog.csdn.net/shfshihuafeng/article/details/90734595

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章