HBASE-1706 META row with missing HRI breaks UI

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@798000 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2009-07-26 23:09:45 +00:00
parent 55e98de9eb
commit 9823e86775
2 changed files with 7 additions and 2 deletions

View File

@ -285,6 +285,7 @@ Release 0.20.0 - Unreleased
HBASE-1607 transactions / indexing fixes: trx deletes not handeled, index
scan can't specify stopRow (Clint Morgan via Stack)
HBASE-1693 NPE close_region ".META." in shell
HBASE-1706 META row with missing HRI breaks UI
IMPROVEMENTS
HBASE-1089 Add count of regions on filesystem to master UI; add percentage

View File

@ -353,8 +353,12 @@ public class HConnectionManager implements HConstants {
MetaScannerVisitor visitor = new MetaScannerVisitor() {
public boolean processRow(Result result) throws IOException {
try {
HRegionInfo info = Writables.getHRegionInfo(
result.getValue(CATALOG_FAMILY, REGIONINFO_QUALIFIER));
byte[] value =
result.getValue(CATALOG_FAMILY, REGIONINFO_QUALIFIER);
HRegionInfo info = null;
if (value != null) {
info = Writables.getHRegionInfo(value);
}
// Only examine the rows where the startKey is zero length
if (info != null && info.getStartKey().length == 0) {
uniqueTables.add(info.getTableDesc());