天天看點

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont

Found lingering reference異常

官方解決:

第一種解決:hbase hbck -fixReferenceFiles  month_hotstatic

另一種方法:

#http://stackoverflow.com/questions/17810443/error-found-inconsistency-in-table-hbase

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. <code>hadoop fs -rm hdfs://master:8020/hbase/LogTable/f41ff2fae25d1dab3f16306f4f995369/l/d9c7d33257ae406caf8d94277ff6d247.fbda7904cd1f0ac9583e04029a138487</code>.

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 <code>hbase hbck -fix</code> again to confirm there are no other inconsistencies.

 hbase hbck &gt; 1.log 2&gt;&amp;1

 cat 1.log | grep -i "ERROR" 

 cat 1.log | grep -i "ERROR" | awk -F"ERROR: Found lingering reference file " '{print $2}' &gt;a.txt

#!/bin/sh

while read line

do

        hadoop fs -rmr $line

done &lt; a.txt