JavaEar 专注于收集分享传播有价值的技术资料

ERROR: Found inconsistency in table HBase

We are using HBase 0.94.7 with two region servers. We have a region always in transition. When I do the hbase hbck, there are inconsistencies found. But neither hbase hbck -repair nor hbase hbck -fix would help because of this region in transition. Here is the log from hbase hbck

ERROR: Region { meta => LogTable,\x00\x00\x01\xE8\x00\x00\x01@\x07B\x02\xCF\xEF\xCE>.,1374573828457.f41ff2fae25d1dab3f16306f4f995369., hdfs => hdfs://master:8020/hbase/LogTable/f41ff2fae25d1dab3f16306f4f995369, deployed =>  } not deployed on any region server.
ERROR: There is a hole in the region chain between \x00\x00\x01\xE8\x00\x00\x01@\x07B\x02\xCF\xEF\xCE>. and \x00\x00\x01\xFC\x00\x00\x01@\x08\x1E1\x0F\x07&\xCE\x11.  You need to create a new .regioninfo and region dir in hdfs to plug the hole.
ERROR: Found inconsistency in table LogTable
ERROR: Found lingering reference file hdfs://master:8020/hbase/LogTable/f41ff2fae25d1dab3f16306f4f995369/l/d9c7d33257ae406caf8d94277ff6d247.fbda7904cd1f0ac9583e04029a138487
ERROR: Found lingering reference file hdfs://master:8020/hbase/LogTable/f41ff2fae25d1dab3f16306f4f995369/l/b4f4b4ba52f041d5b9ee03318cac7fb7.fbda7904cd1f0ac9583e04029a138487
ERROR: Found lingering reference file hdfs://master:8020/hbase/LogTable/f41ff2fae25d1dab3f16306f4f995369/l/ee7dd42b15fe4622882ec6a7a773e01f.fbda7904cd1f0ac9583e04029a138487

When I tried hbase hbck -repair, it loops infinitely because of the region in transition:

INFO util.HBaseFsckRepair: Region still in transition, waiting for it to become assigned: {NAME => 'LogTable'....}

I have no clue how to resolve this problem, can anyone help?

Thanks

2个回答

    最佳答案
  1. try this:

    hbase org.apache.hadoop.hbase.util.Merge <br/>
    

    Usage:

    bin/hbase merge [table-name] region-1 region-2 
    
  2. 参考答案2
  3. This looks like you had a failed region split, see [HBASE-8052] (https://issues.apache.org/jira/browse/HBASE-8502) for more details.

    This bug leaves references to parent regions that have been moved in HDFS. To fix, just delete the reference files listed in the HBCK output e.g. hadoop fs -rm hdfs://master:8020/hbase/LogTable/f41ff2fae25d1dab3f16306f4f995369/l/d9c7d33257ae406caf8d94277ff6d247.fbda7904cd1f0ac9583e04029a138487.

    Once the bad references are gone the region should be assigned automatically. You may have to do the assignment from the shell, in my experience though it only takes a minute or two for the region to get reassigned. Then run hbase hbck -fix again to confirm there are no other inconsistencies.