cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [2/2] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Date Wed, 19 Aug 2015 14:26:36 GMT
Merge branch 'cassandra-2.2' into cassandra-3.0

Conflicts:
	test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java


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

Branch: refs/heads/cassandra-3.0
Commit: 811ee6ca2e167d1676501b64b4c1506ff281bf20
Parents: db78236 de2e0a6
Author: Joshua McKenzie <jmckenzie@apache.org>
Authored: Wed Aug 19 10:25:57 2015 -0400
Committer: Joshua McKenzie <jmckenzie@apache.org>
Committed: Wed Aug 19 10:25:57 2015 -0400

----------------------------------------------------------------------
 .../LeveledCompactionStrategyTest.java          | 21 ++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/811ee6ca/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
index 46c7068,ccfc6ab..bb15e88
--- a/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java
@@@ -26,6 -26,9 +26,7 @@@ import java.util.List
  import java.util.Random;
  import java.util.UUID;
  
 -import org.apache.cassandra.io.sstable.format.SSTableReader;
+ import junit.framework.Assert;
  import org.junit.After;
  import org.junit.Before;
  import org.junit.BeforeClass;
@@@ -116,12 -131,19 +122,19 @@@ public class LeveledCompactionStrategyT
          }
  
          waitForLeveling(cfs);
 -        WrappingCompactionStrategy strategy = (WrappingCompactionStrategy) cfs.getCompactionStrategy();
 +        CompactionStrategyManager strategy =  cfs.getCompactionStrategyManager();
          // Checking we're not completely bad at math
-         assert strategy.getSSTableCountPerLevel()[1] > 0;
-         assert strategy.getSSTableCountPerLevel()[2] > 0;
+         int l1Count = strategy.getSSTableCountPerLevel()[1];
+         int l2Count = strategy.getSSTableCountPerLevel()[2];
+         if (l1Count == 0 || l2Count == 0)
+         {
+             logger.error("L1 or L2 has 0 sstables. Expected > 0 on both.");
+             logger.error("L1: " + l1Count);
+             logger.error("L2: " + l2Count);
+             Assert.fail();
+         }
  
 -        Collection<Collection<SSTableReader>> groupedSSTables = cfs.getCompactionStrategy().groupSSTablesForAntiCompaction(cfs.getSSTables());
 +        Collection<Collection<SSTableReader>> groupedSSTables = cfs.getCompactionStrategyManager().groupSSTablesForAntiCompaction(cfs.getLiveSSTables());
          for (Collection<SSTableReader> sstableGroup : groupedSSTables)
          {
              int groupLevel = -1;


Mime
View raw message