hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1148138 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Date Tue, 19 Jul 2011 03:38:54 GMT
Author: tedyu
Date: Tue Jul 19 03:38:53 2011
New Revision: 1148138

URL: http://svn.apache.org/viewvc?rev=1148138&view=rev
Log:
HBASE-4112  Creating table may throw NullPointerException (Jinchao via Ted Yu)

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1148138&r1=1148137&r2=1148138&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Jul 19 03:38:53 2011
@@ -163,6 +163,7 @@ Release 0.91.0 - Unreleased
    HBASE-4087  HBaseAdmin should perform validation of connection it holds
    HBASE-4052  Enabling a table after master switch does not allow table scan,
                throwing NotServingRegionException (ramkrishna via Ted Yu)
+   HBASE-4112  Creating table may throw NullPointerException (Jinchao via Ted Yu)
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1148138&r1=1148137&r2=1148138&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java Tue Jul 19 03:38:53
2011
@@ -360,9 +360,13 @@ public class HBaseAdmin implements Abort
       MetaScannerVisitor visitor = new MetaScannerVisitor() {
         @Override
         public boolean processRow(Result rowResult) throws IOException {
-          HRegionInfo info = Writables.getHRegionInfo(
+          HRegionInfo info = Writables.getHRegionInfoOrNull(
               rowResult.getValue(HConstants.CATALOG_FAMILY,
                   HConstants.REGIONINFO_QUALIFIER));
+          //If regioninfo is null, skip this row
+          if (null == info) {
+            return true;
+          }
           if (!(Bytes.equals(info.getTableName(), desc.getName()))) {
             return false;
           }



Mime
View raw message