hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r910399 - /hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
Date Tue, 16 Feb 2010 05:21:12 GMT
Author: stack
Date: Tue Feb 16 05:21:12 2010
New Revision: 910399

URL: http://svn.apache.org/viewvc?rev=910399&view=rev
Log:
HBASE-2210 NPE in thrift deleteAll

Modified:
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java?rev=910399&r1=910398&r2=910399&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Tue
Feb 16 05:21:12 2010
@@ -378,7 +378,7 @@
         HTable table = getTable(tableName);
         Delete delete  = new Delete(row);
         byte [][] famAndQf = KeyValue.parseColumn(column);
-        if (famAndQf[1].length == 0) {
+        if (famAndQf[1] == null) {
           delete.deleteFamily(famAndQf[0], timestamp);
         } else {
           delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp);
@@ -457,7 +457,7 @@
         for (Mutation m : mutations) {
           byte[][] famAndQf = KeyValue.parseColumn(m.column);
           if (m.isDelete) {
-            if (famAndQf[1].length == 0)
+            if (famAndQf[1] == null)
               delete.deleteFamily(famAndQf[0], timestamp);
             else
               delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp);
@@ -496,7 +496,7 @@
           byte[][] famAndQf = KeyValue.parseColumn(m.column);
           if (m.isDelete) {
             // no qualifier, family only.
-            if (famAndQf[1].length == 0)
+            if (famAndQf[1] == null)
               delete.deleteFamily(famAndQf[0], timestamp);
             else
               delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp);



Mime
View raw message