cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r765451 - /incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java
Date Thu, 16 Apr 2009 02:09:25 GMT
Author: jbellis
Date: Thu Apr 16 02:09:24 2009
New Revision: 765451

URL: http://svn.apache.org/viewvc?rev=765451&view=rev
Log:
generate supercolumn tombstone when a 2-tuple delete is passed to a super CF.
patch by jbellis; reviewed by Sandeep Tata for #84

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java?rev=765451&r1=765450&r2=765451&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java Thu Apr 16 02:09:24
2009
@@ -42,6 +42,7 @@
 import org.apache.cassandra.service.column_t;
 import org.apache.cassandra.service.superColumn_t;
 import org.apache.cassandra.utils.FBUtilities;
+import org.apache.cassandra.config.DatabaseDescriptor;
 
 
 /**
@@ -187,7 +188,16 @@
             columnFamily = new ColumnFamily(cfName);
         if (values.length == 2)
         {
-            columnFamily.addColumn(values[1], ArrayUtils.EMPTY_BYTE_ARRAY, timestamp, true);
+            if (DatabaseDescriptor.getColumnFamilyType(cfName).equals("Standard"))
+            {
+                columnFamily.addColumn(values[1], ArrayUtils.EMPTY_BYTE_ARRAY, timestamp,
true);
+            }
+            else
+            {
+                SuperColumn sc = new SuperColumn(values[1]);
+                sc.markForDeleteAt(timestamp);
+                columnFamily.addColumn(sc);
+            }
         }
         else if (values.length == 3)
         {



Mime
View raw message