Some fixup of hbck log messages -- added info; more around 'inconsistencies'... looks like many inconsistencies and 'ERRORS' are transient

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1042284 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-12-05 04:58:05 +00:00
parent 5441eaa83d
commit d60262f2a9
1 changed files with 5 additions and 5 deletions

View File

@ -501,14 +501,14 @@ public class HBaseFsck {
// Check if chain is broken // Check if chain is broken
if (!edges.containsKey(last)) { if (!edges.containsKey(last)) {
errors.detail("Chain of regions in table " + tableName + errors.detail("Chain of regions in table " + tableName +
" is broken."); " is broken; edges does not contain " + Bytes.toString(last));
return false; return false;
} }
next = edges.get(last); next = edges.get(last);
// Found a cycle // Found a cycle
if (visited.contains(next)) { if (visited.contains(next)) {
errors.detail("Chain of regions in table " + tableName + errors.detail("Chain of regions in table " + tableName +
" has a cycle."); " has a cycle around " + Bytes.toString(next));
return false; return false;
} }
// Mark next node as visited // Mark next node as visited
@ -518,7 +518,8 @@ public class HBaseFsck {
// If we have visited all elements we are fine // If we have visited all elements we are fine
if (edges.size() != visited.size()) { if (edges.size() != visited.size()) {
errors.detail("Chain of regions in table " + tableName + errors.detail("Chain of regions in table " + tableName +
" contains less elements than are listed in META."); " contains less elements than are listed in META; visited=" + visited.size() +
", edges=" + edges.size());
return false; return false;
} }
return true; return true;
@ -748,8 +749,7 @@ public class HBaseFsck {
for (TInfo tInfo : tablesInfo.values()) { for (TInfo tInfo : tablesInfo.values()) {
if (tInfo.check()) { if (tInfo.check()) {
System.out.println(" " + tInfo.getName() + " is okay."); System.out.println(" " + tInfo.getName() + " is okay.");
} } else {
else {
System.out.println("Table " + tInfo.getName() + " is inconsistent."); System.out.println("Table " + tInfo.getName() + " is inconsistent.");
} }
System.out.println(" Number of regions: " + tInfo.getNumRegions()); System.out.println(" Number of regions: " + tInfo.getNumRegions());