hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r725324 - in /hadoop/hbase/trunk: ./ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/client/tableindexed/
Date Wed, 10 Dec 2008 16:23:43 GMT
Author: apurtell
Date: Wed Dec 10 08:23:42 2008
New Revision: 725324

URL: http://svn.apache.org/viewvc?rev=725324&view=rev
Log:
HBASE-1054 Index NPE on scanning

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexSpecification.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexedTable.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=725324&r1=725323&r2=725324&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Wed Dec 10 08:23:42 2008
@@ -103,6 +103,7 @@
                and no stop flag given.
    HBASE-900   Regionserver memory leak causing OOME during relatively
                modest bulk importing; part 1
+   HBASE-1054  Index NPE on scanning (Clint Morgan via Andrew Purtell)
 
   IMPROVEMENTS
    HBASE-901   Add a limit to key length, check key and value length on client side

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java?rev=725324&r1=725323&r2=725324&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java Wed Dec 10 08:23:42
2008
@@ -188,6 +188,7 @@
         desc.values.entrySet()) {
       this.values.put(e.getKey(), e.getValue());
     }
+    this.indexes.putAll(desc.indexes);
   }
 
   /*
@@ -494,6 +495,11 @@
     s.append(FAMILIES);
     s.append(" => ");
     s.append(families.values());
+
+    s.append(", ");
+    s.append("INDEXES");
+    s.append(" => ");
+    s.append(indexes.values());
     s.append('}');
     return s.toString();
   }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexSpecification.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexSpecification.java?rev=725324&r1=725323&r2=725324&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexSpecification.java
(original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexSpecification.java
Wed Dec 10 08:23:42 2008
@@ -175,4 +175,14 @@
         .writeObject(out, keyGenerator, IndexKeyGenerator.class, conf);
   }
 
+  /** {@inheritDoc} */
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("ID => ");
+    sb.append(indexId);
+    return sb.toString();
+  }
+  
+  
 }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexedTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexedTable.java?rev=725324&r1=725323&r2=725324&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexedTable.java
(original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/tableindexed/IndexedTable.java
Wed Dec 10 08:23:42 2008
@@ -164,7 +164,10 @@
         if (columns != null && columns.length > 0) {
           LOG.debug("Going to base table for remaining columns");
           RowResult baseResult = IndexedTable.this.getRow(baseRow, columns);
-          colValues.putAll(baseResult);
+          
+          if (baseResult != null) {
+            colValues.putAll(baseResult);
+          }
         }
         for (Entry<byte[], Cell> entry : row.entrySet()) {
           byte[] col = entry.getKey();



Mime
View raw message