cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1199245 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
Date Tue, 08 Nov 2011 14:00:56 GMT
Author: jake
Date: Tue Nov  8 14:00:55 2011
New Revision: 1199245

URL: http://svn.apache.org/viewvc?rev=1199245&view=rev
Log:
Revert CASSANDRA-2855

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1199245&r1=1199244&r2=1199245&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Tue Nov  8 14:00:55 2011
@@ -4,7 +4,6 @@
  * (CQL) update grammar to require key clause in DELETE statement
    (CASSANDRA-3349)
  * (CQL) allow numeric keyspace names in USE statement (CASSANDRA-3350)
- * (Hadoop) skip empty rows when slicing the entire row (CASSANDRA-2855)
  * Fix handling of tombstone by SSTableExport/Import (CASSANDRA-3357)
  * fix ColumnIndexer to use long offsets (CASSANDRA-3358)
  * Display CLI version string on startup (CASSANDRA-3196)

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java?rev=1199245&r1=1199244&r2=1199245&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
Tue Nov  8 14:00:55 2011
@@ -98,7 +98,7 @@ public class ColumnFamilyRecordReader ex
         batchRowCount = ConfigHelper.getRangeBatchSize(conf);
         cfName = ConfigHelper.getInputColumnFamily(conf);
         consistencyLevel = ConsistencyLevel.valueOf(ConfigHelper.getReadConsistencyLevel(conf));
-
+        
         
         keyspace = ConfigHelper.getInputKeyspace(conf);
         
@@ -257,24 +257,14 @@ public class ColumnFamilyRecordReader ex
                     rows = null;
                     return;
                 }
-
-                // Pre-compute the last row key, before removing empty rows
-                ByteBuffer lastRowKey = rows.get(rows.size() - 1).key;
-
-                // only remove empty rows if the slice predicate is empty
-                if (isPredicateEmpty(predicate))
-                {
-                    Iterator<KeySlice> rowsIterator = rows.iterator();
-                    while (rowsIterator.hasNext())
-                        if (rowsIterator.next().columns.isEmpty())
-                            rowsIterator.remove();
-                }
-                
-                // reset to iterate through the new batch
+                               
+                // reset to iterate through this new batch
                 i = 0;
-
+                
                 // prepare for the next slice to be read
-                startToken = partitioner.getTokenFactory().toString(partitioner.getToken(lastRowKey));
+                KeySlice lastRow = rows.get(rows.size() - 1);
+                ByteBuffer rowkey = lastRow.key;
+                startToken = partitioner.getTokenFactory().toString(partitioner.getToken(rowkey));
             }
             catch (Exception e)
             {
@@ -349,16 +339,4 @@ public class ColumnFamilyRecordReader ex
             return sc;
         }
     }
-
-    private boolean isPredicateEmpty(SlicePredicate predicate)
-    {
-        if (predicate != null)
-            if (predicate.isSetSlice_range())
-                if (predicate.getSlice_range().getStart() != null && predicate.getSlice_range().getFinish()
!= null)
-                return false;
-            else if (predicate.isSetColumn_names())
-                return false;
-
-        return true;
-    }
 }



Mime
View raw message