HBASE-7 Provide a HBase checker and repair tool similar to fsck; add handling of disable parents
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@948203 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9a5cef8aba
commit
41a4c36ec9
|
@ -134,15 +134,19 @@ while (result = scanner.next())
|
||||||
bytes = result.getValue(HConstants::CATALOG_FAMILY, HConstants::REGIONINFO_QUALIFIER)
|
bytes = result.getValue(HConstants::CATALOG_FAMILY, HConstants::REGIONINFO_QUALIFIER)
|
||||||
hri = Writables.getHRegionInfo(bytes)
|
hri = Writables.getHRegionInfo(bytes)
|
||||||
if oldHRI
|
if oldHRI
|
||||||
unless Bytes.equals(oldHRI.getEndKey(), hri.getStartKey())
|
if oldHRI.isOffline() && Bytes.equals(oldHRI.getStartKey(), hri.getStartKey())
|
||||||
LOG.warn("hole after " + hri.toString())
|
# Presume offlined parent
|
||||||
|
elsif Bytes.equals(oldHRI.getEndKey(), hri.getStartKey())
|
||||||
|
# Start key of next matches end key of previous
|
||||||
|
else
|
||||||
|
LOG.warn("hole after " + oldHRI.toString())
|
||||||
if fixup
|
if fixup
|
||||||
bad = 1 unless fixup(oldHRI, hri, metatable, fs, rootdir)
|
bad = 1 unless fixup(oldHRI, hri, metatable, fs, rootdir)
|
||||||
else
|
else
|
||||||
bad = 1
|
bad = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
oldHRI = hri
|
oldHRI = hri
|
||||||
end
|
end
|
||||||
scanner.close()
|
scanner.close()
|
||||||
|
|
Loading…
Reference in New Issue