hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r916167 - /hadoop/hbase/trunk/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java
Date Thu, 25 Feb 2010 07:57:24 GMT
Author: apurtell
Date: Thu Feb 25 07:57:24 2010
New Revision: 916167

URL: http://svn.apache.org/viewvc?rev=916167&view=rev
Log:
HBASE-2257 [stargate] multiuser mode; fix error introduced with KV.parseColumn

Modified:
    hadoop/hbase/trunk/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java

Modified: hadoop/hbase/trunk/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java?rev=916167&r1=916166&r2=916167&view=diff
==============================================================================
--- hadoop/hbase/trunk/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java
(original)
+++ hadoop/hbase/trunk/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java
Thu Feb 25 07:57:24 2010
@@ -156,7 +156,11 @@
         Put put = new Put(key);
         for (CellModel cell: row.getCells()) {
           byte [][] parts = KeyValue.parseColumn(cell.getColumn());
-          put.add(parts[0], parts[1], cell.getTimestamp(), cell.getValue());
+          if (parts.length == 2 && parts[1].length > 0) {
+            put.add(parts[0], parts[1], cell.getTimestamp(), cell.getValue());
+          } else {
+            put.add(parts[0], null, cell.getTimestamp(), cell.getValue());
+          }
         }
         table.put(put);
         if (LOG.isDebugEnabled()) {
@@ -205,7 +209,11 @@
       }
       Put put = new Put(row);
       byte parts[][] = KeyValue.parseColumn(column);
-      put.add(parts[0], parts[1], timestamp, message);
+      if (parts.length == 2 && parts[1].length > 0) {
+        put.add(parts[0], parts[1], timestamp, message);
+      } else {
+        put.add(parts[0], null, timestamp, message);
+      }
       table = pool.getTable(actualTableName);
       table.put(put);
       if (LOG.isDebugEnabled()) {



Mime
View raw message