cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [3/3] git commit: Merge branch 'cassandra-1.2' into trunk
Date Thu, 11 Apr 2013 16:12:57 GMT
Merge branch 'cassandra-1.2' into trunk

Conflicts:
	src/java/org/apache/cassandra/db/ColumnIndex.java
	src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
	test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0aaf67a7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0aaf67a7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0aaf67a7

Branch: refs/heads/trunk
Commit: 0aaf67a74f441a8d3c4b54920f35c93f064be4f5
Parents: 8b0e186 0f1fb43
Author: Yuki Morishita <yukim@apache.org>
Authored: Thu Apr 11 11:12:36 2013 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Thu Apr 11 11:12:36 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    3 +-
 src/java/org/apache/cassandra/db/ColumnIndex.java  |   24 +++++++---
 .../apache/cassandra/io/sstable/SSTableWriter.java |    2 +-
 .../cassandra/streaming/StreamingTransferTest.java |   36 +++++++++++++++
 4 files changed, 56 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0aaf67a7/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0aaf67a7/src/java/org/apache/cassandra/db/ColumnIndex.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnIndex.java
index e307458,bcd0eef..daaac63
--- a/src/java/org/apache/cassandra/db/ColumnIndex.java
+++ b/src/java/org/apache/cassandra/db/ColumnIndex.java
@@@ -58,12 -67,23 +58,21 @@@ public class ColumnInde
  
          public Builder(ColumnFamily cf,
                         ByteBuffer key,
 -                       int estimatedColumnCount,
 +                       DataOutput output)
+                        DataOutput output,
+                        boolean fromStream)
          {
              this.indexOffset = rowHeaderSize(key, cf.deletionInfo());
 -            this.result = new ColumnIndex(estimatedColumnCount);
 +            this.result = new ColumnIndex(new ArrayList<IndexHelper.IndexInfo>());
              this.output = output;
-             this.tombstoneTracker = new RangeTombstone.Tracker(cf.getComparator());
 -            this.atomSerializer = cf.getOnDiskSerializer();
+             this.tombstoneTracker = fromStream ? null : new RangeTombstone.Tracker(cf.getComparator());
+         }
+ 
+         public Builder(ColumnFamily cf,
+                        ByteBuffer key,
 -                       int estimatedColumnCount,
+                        DataOutput output)
+         {
 -            this(cf, key, estimatedColumnCount, output, false);
++            this(cf, key, output, false);
          }
  
          /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0aaf67a7/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
index 9b6db46,c64fd27..43e3aa5
--- a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
@@@ -240,13 -236,12 +240,13 @@@ public class SSTableWriter extends SSTa
          // deserialize each column to obtain maxTimestamp and immediately serialize it.
          long minTimestamp = Long.MAX_VALUE;
          long maxTimestamp = Long.MIN_VALUE;
 +        int maxLocalDeletionTime = Integer.MIN_VALUE;
          StreamingHistogram tombstones = new StreamingHistogram(TOMBSTONE_HISTOGRAM_BIN_SIZE);
 -        ColumnFamily cf = ColumnFamily.create(metadata, ArrayBackedSortedColumns.factory());
 +        ColumnFamily cf = ArrayBackedSortedColumns.factory.create(metadata);
          cf.delete(deletionInfo);
  
-         ColumnIndex.Builder columnIndexer = new ColumnIndex.Builder(cf, key.key, dataFile.stream);
 -        ColumnIndex.Builder columnIndexer = new ColumnIndex.Builder(cf, key.key, columnCount,
dataFile.stream, true);
 -        OnDiskAtom.Serializer atomSerializer = cf.getOnDiskSerializer();
++        ColumnIndex.Builder columnIndexer = new ColumnIndex.Builder(cf, key.key, dataFile.stream,
true);
 +        OnDiskAtom.Serializer atomSerializer = Column.onDiskSerializer();
          for (int i = 0; i < columnCount; i++)
          {
              // deserialize column with PRESERVE_SIZE because we've written the dataSize
based on the

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0aaf67a7/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java
index 46e0e6c,2befe45..335f98c
--- a/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java
+++ b/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java
@@@ -23,9 -23,10 +23,10 @@@ import static junit.framework.Assert.as
  import org.apache.cassandra.OrderedJUnit4ClassRunner;
  import org.apache.cassandra.Util;
  import static org.apache.cassandra.Util.column;
 -import static org.apache.cassandra.Util.addMutation;
  
  import java.net.InetAddress;
 +import java.sql.Date;
+ import java.nio.ByteBuffer;
  import java.util.*;
  
  import org.apache.cassandra.SchemaLoader;


Mime
View raw message