Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts:
CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cf9ae5f9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cf9ae5f9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cf9ae5f9
Branch: refs/heads/cassandra-2.1
Commit: cf9ae5f9cddd81de6e153eae48357ca0842bf499
Parents: 2e00ba8 19444ea
Author: Aleksey Yeschenko <[email protected]>
Authored: Wed Mar 12 19:58:35 2014 +0300
Committer: Aleksey Yeschenko <[email protected]>
Committed: Wed Mar 12 19:58:35 2014 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../io/sstable/SSTableIdentityIterator.java | 49 +++-----------------
2 files changed, 8 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf9ae5f9/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7a1fc60,42dc4ee..cb51c12
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -19,6 -3,10 +19,7 @@@ Merged from 2.0
* Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790)
* Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838)
* Fix static counter columns (CASSANDRA-6827)
+ * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844)
-
-
-2.0.6
* Avoid race-prone second "scrub" of system keyspace (CASSANDRA-6797)
* Pool CqlRecordWriter clients by inetaddress rather than Range
(CASSANDRA-6665)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf9ae5f9/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
index 11f2f71,52da9bb..ce4b670
--- a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
@@@ -20,33 -20,33 +20,21 @@@ package org.apache.cassandra.io.sstable
import java.io.*;
import java.util.Iterator;
--import org.apache.cassandra.serializers.MarshalException;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.db.*;
import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
import org.apache.cassandra.io.util.RandomAccessReader;
++import org.apache.cassandra.serializers.MarshalException;
public class SSTableIdentityIterator implements
Comparable<SSTableIdentityIterator>, OnDiskAtomIterator
{
-- private static final Logger logger =
LoggerFactory.getLogger(SSTableIdentityIterator.class);
--
private final DecoratedKey key;
private final DataInput in;
public final long dataSize; // we [still] require this so compaction can
tell if it's safe to read the row into memory
public final ColumnSerializer.Flag flag;
private final ColumnFamily columnFamily;
-- private final int columnCount;
--
private final Iterator<OnDiskAtom> atomIterator;
-- private final Descriptor.Version dataVersion;
--
-- // Used by lazilyCompactedRow, so that we see the same things when
deserializing the first and second time
-- private final int expireBefore;
--
private final boolean validateColumns;
private final String filename;
@@@ -56,7 -56,7 +44,6 @@@
* @param file Reading using this file.
* @param key Key of this row.
* @param dataSize length of row data
-- * @throws IOException
*/
public SSTableIdentityIterator(SSTableReader sstable, RandomAccessReader
file, DecoratedKey key, long dataSize)
{
@@@ -92,17 -92,17 +79,18 @@@
this.filename = filename;
this.key = key;
this.dataSize = dataSize;
-- this.expireBefore = (int)(System.currentTimeMillis() / 1000);
this.flag = flag;
this.validateColumns = checkData;
-- this.dataVersion = sstable == null ? Descriptor.Version.CURRENT :
sstable.descriptor.version;
++
++ Descriptor.Version dataVersion = sstable == null ?
Descriptor.Version.CURRENT : sstable.descriptor.version;
++ int expireBefore = (int) (System.currentTimeMillis() / 1000);
++ columnFamily = ArrayBackedSortedColumns.factory.create(metadata);
try
{
- columnFamily = ArrayBackedSortedColumns.factory.create(metadata);
- columnFamily = EmptyColumns.factory.create(metadata);
columnFamily.delete(DeletionTime.serializer.deserialize(in));
-- columnCount = dataVersion.hasRowSizeAndColumnCount ? in.readInt()
: Integer.MAX_VALUE;
- atomIterator = columnFamily.metadata().getOnDiskIterator(in,
columnCount, dataVersion);
++ int columnCount = dataVersion.hasRowSizeAndColumnCount ?
in.readInt() : Integer.MAX_VALUE;
+ atomIterator = columnFamily.metadata().getOnDiskIterator(in,
columnCount, flag, expireBefore, dataVersion);
}
catch (IOException e)
{
@@@ -177,31 -177,31 +165,8 @@@
}
}
-- public ColumnFamily getColumnFamilyWithColumns(ColumnFamily.Factory
containerFactory)
-- {
-- ColumnFamily cf = columnFamily.cloneMeShallow(containerFactory,
false);
-- // since we already read column count, just pass that value and
continue deserialization
-- Iterator<OnDiskAtom> iter = cf.metadata().getOnDiskIterator(in,
columnCount, flag, expireBefore, dataVersion);
-- while (iter.hasNext())
-- cf.addAtom(iter.next());
--
-- if (validateColumns)
-- {
-- try
-- {
-- cf.metadata().validateColumns(cf);
-- }
-- catch (MarshalException e)
-- {
-- throw new RuntimeException("Error validating row " + key, e);
-- }
-- }
-- return cf;
-- }
--
public int compareTo(SSTableIdentityIterator o)
{
return key.compareTo(o.key);
}
--
}