HADOOP-2308 null regioninfo breaks meta scanner

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@599875 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2007-11-30 17:06:31 +00:00
parent e24940438a
commit 7fff3ab5f6
2 changed files with 9 additions and 3 deletions

View File

@ -41,6 +41,7 @@ Trunk (unreleased changes)
(Bryan Duxbury via Stack)
HADOOP-2295 Fix assigning a region to multiple servers
HADOOP-2234 TableInputFormat erroneously aggregates map values
HADOOP-2308 null regioninfo breaks meta scanner
IMPROVEMENTS
HADOOP-2401 Add convenience put method that takes writable

View File

@ -229,14 +229,19 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
if (values == null || values.size() == 0) {
break;
}
for (Map.Entry<Writable, Writable> e: values.entrySet()) {
HStoreKey key = (HStoreKey) e.getKey();
results.put(key.getColumn(),
((ImmutableBytesWritable) e.getValue()).get());
}
HRegionInfo info = (HRegionInfo) Writables.getWritable(
results.get(COL_REGIONINFO), new HRegionInfo());
byte [] bytes = results.get(COL_REGIONINFO);
if (bytes == null) {
LOG.warn(COL_REGIONINFO.toString() + " is empty; has keys: " +
values.keySet().toString());
continue;
}
HRegionInfo info = (HRegionInfo) Writables.getWritable(bytes,
new HRegionInfo());
String serverName = Writables.bytesToString(results.get(COL_SERVER));
long startCode = Writables.bytesToLong(results.get(COL_STARTCODE));
if (LOG.isDebugEnabled()) {