hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r599875 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/java/org/apache/hadoop/hbase/HMaster.java
Date Fri, 30 Nov 2007 17:06:35 GMT
Author: stack
Date: Fri Nov 30 09:06:31 2007
New Revision: 599875

URL: http://svn.apache.org/viewvc?rev=599875&view=rev
Log:
HADOOP-2308 null regioninfo breaks meta scanner

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=599875&r1=599874&r2=599875&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Fri Nov 30 09:06:31 2007
@@ -41,6 +41,7 @@
                (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

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java?rev=599875&r1=599874&r2=599875&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java Fri
Nov 30 09:06:31 2007
@@ -229,14 +229,19 @@
           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()) {



Mime
View raw message