cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bened...@apache.org
Subject [6/6] cassandra git commit: Merge branch 'cassandra-2.2' into trunk
Date Mon, 06 Jul 2015 11:19:45 GMT
Merge branch 'cassandra-2.2' into trunk

Conflicts:
	test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java


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

Branch: refs/heads/trunk
Commit: 2d7fec94f13dd8a7d2b14179fc89202413bdcbf7
Parents: 582ef4b 1f430c5
Author: Benedict Elliott Smith <benedict@apache.org>
Authored: Mon Jul 6 12:14:50 2015 +0100
Committer: Benedict Elliott Smith <benedict@apache.org>
Committed: Mon Jul 6 12:14:50 2015 +0100

----------------------------------------------------------------------
 .../cassandra/db/compaction/CompactionTask.java  |  5 +----
 .../apache/cassandra/db/lifecycle/Helpers.java   | 10 ++++++++++
 .../db/lifecycle/LifecycleTransaction.java       |  8 +++++++-
 .../apache/cassandra/db/lifecycle/Tracker.java   | 16 ++++++++++++----
 .../cassandra/io/sstable/SSTableRewriter.java    |  9 +++++++--
 .../io/sstable/SSTableRewriterTest.java          | 19 +++++++------------
 6 files changed, 44 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2d7fec94/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2d7fec94/src/java/org/apache/cassandra/io/sstable/SSTableRewriter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2d7fec94/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java
index 863ae4c,105ecf6..84568c3
--- a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java
@@@ -248,26 -234,16 +243,25 @@@ public class SSTableRewriterTest extend
          Keyspace keyspace = Keyspace.open(KEYSPACE);
          ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
          truncate(cfs);
-         assertEquals(0, cfs.metric.liveDiskSpaceUsed.getCount());
  
 -        ArrayBackedSortedColumns cf = ArrayBackedSortedColumns.factory.create(cfs.metadata);
 -        for (int i = 0; i < 100; i++)
 -            cf.addColumn(Util.cellname(i), ByteBuffer.allocate(1000), 1);
          File dir = cfs.directories.getDirectoryForNewSSTables();
 -
 -        try (SSTableWriter writer = getWriter(cfs, dir);)
 +        try (SSTableWriter writer = getWriter(cfs, dir))
          {
              for (int i = 0; i < 10000; i++)
 -                writer.append(StorageService.getPartitioner().decorateKey(random(i, 10)),
cf);
 +            {
 +                RowUpdateBuilder builder = new RowUpdateBuilder(cfs.metadata, 1,  random(i,
10));
 +
 +                PartitionUpdate update = null;
 +
 +                for (int j = 0; j < 100; j++)
 +                {
 +                    builder.clustering("" + j).add("val", ByteBuffer.allocate(1000));
 +                    update = builder.buildUpdate();
 +                }
 +
 +                writer.append(update.unfilteredIterator());
 +            }
 +
              SSTableReader s = writer.setMaxDataAge(1000).openEarly();
              assert s != null;
              assertFileCounts(dir.list(), 2, 2);


Mime
View raw message