HBASE-4375 [hbck] Add region coverage visualization to hbck
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1172310 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cadd288c29
commit
ddb6a6870d
|
@ -630,6 +630,8 @@ Release 0.90.5 - Unreleased
|
||||||
in hbck. (Jonathan Hsieh)
|
in hbck. (Jonathan Hsieh)
|
||||||
HBASE-4384 Hard to tell what causes failure in CloseRegionHandler#getCurrentVersion
|
HBASE-4384 Hard to tell what causes failure in CloseRegionHandler#getCurrentVersion
|
||||||
(Harsh J)
|
(Harsh J)
|
||||||
|
HBASE-4375 [hbck] Add region coverage visualization to hbck
|
||||||
|
(Jonathan Hsieh)
|
||||||
|
|
||||||
Release 0.90.4 - August 10, 2011
|
Release 0.90.4 - August 10, 2011
|
||||||
|
|
||||||
|
|
|
@ -679,9 +679,31 @@ public class HBaseFsck {
|
||||||
}
|
}
|
||||||
prevKey = key;
|
prevKey = key;
|
||||||
}
|
}
|
||||||
|
if (details) {
|
||||||
|
// do full region split map dump
|
||||||
|
dump(sc.getSplits(), regions);
|
||||||
|
}
|
||||||
return errors.getErrorList().size() == originalErrorsCount;
|
return errors.getErrorList().size() == originalErrorsCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This dumps data in a visually reasonable way for visual debugging
|
||||||
|
*
|
||||||
|
* @param splits
|
||||||
|
* @param regions
|
||||||
|
*/
|
||||||
|
void dump(TreeSet<byte[]> splits, Multimap<byte[], HbckInfo> regions) {
|
||||||
|
// we display this way because the last end key should be displayed as well.
|
||||||
|
for (byte[] k : splits) {
|
||||||
|
System.out.print(Bytes.toString(k) + ":\t");
|
||||||
|
for (HbckInfo r : regions.get(k)) {
|
||||||
|
System.out.print("[ "+ r.toString() + ", "
|
||||||
|
+ Bytes.toString(r.getEndKey())+ "]\t");
|
||||||
|
}
|
||||||
|
System.out.println();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue