Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42EDD189D8 for ; Wed, 19 Aug 2015 14:26:36 +0000 (UTC) Received: (qmail 51291 invoked by uid 500); 19 Aug 2015 14:26:36 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 51257 invoked by uid 500); 19 Aug 2015 14:26:36 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 51239 invoked by uid 99); 19 Aug 2015 14:26:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2015 14:26:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E5F43E35E6; Wed, 19 Aug 2015 14:26:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jmckenzie@apache.org To: commits@cassandra.apache.org Date: Wed, 19 Aug 2015 14:26:36 -0000 Message-Id: <341919fda3954914a96f2b58160c8f99@git.apache.org> In-Reply-To: <8f647a096cd544408e7b2da32444fd8c@git.apache.org> References: <8f647a096cd544408e7b2da32444fd8c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0 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 Authored: Wed Aug 19 10:25:57 2015 -0400 Committer: Joshua McKenzie 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> groupedSSTables = cfs.getCompactionStrategy().groupSSTablesForAntiCompaction(cfs.getSSTables()); + Collection> groupedSSTables = cfs.getCompactionStrategyManager().groupSSTablesForAntiCompaction(cfs.getLiveSSTables()); for (Collection sstableGroup : groupedSSTables) { int groupLevel = -1;