Repository: cassandra Updated Branches: refs/heads/trunk ff9673920 -> 27395e78b
remove dead params Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/27395e78 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/27395e78 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/27395e78 Branch: refs/heads/trunk Commit: 27395e78befd3694535736c9756c0380c6a00516 Parents: ff96739 Author: Dave Brosius <[email protected]> Authored: Thu Jun 16 22:28:55 2016 -0400 Committer: Dave Brosius <[email protected]> Committed: Thu Jun 16 22:28:55 2016 -0400 ---------------------------------------------------------------------- .../db/compaction/TimeWindowCompactionStrategy.java | 5 +---- .../db/compaction/TimeWindowCompactionStrategyTest.java | 9 +++------ 2 files changed, 4 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/27395e78/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java index da3ef70..df688c5 100644 --- a/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java +++ b/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java @@ -19,7 +19,6 @@ package org.apache.cassandra.db.compaction; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; @@ -158,8 +157,6 @@ public class TimeWindowCompactionStrategy extends AbstractCompactionStrategy List<SSTableReader> mostInteresting = newestBucket(buckets.left, cfs.getMinimumCompactionThreshold(), cfs.getMaximumCompactionThreshold(), - options.sstableWindowUnit, - options.sstableWindowSize, options.stcsOptions, this.highestWindowSeen); if (!mostInteresting.isEmpty()) @@ -267,7 +264,7 @@ public class TimeWindowCompactionStrategy extends AbstractCompactionStrategy * @return a bucket (list) of sstables to compact. */ @VisibleForTesting - static List<SSTableReader> newestBucket(HashMultimap<Long, SSTableReader> buckets, int minThreshold, int maxThreshold, TimeUnit sstableWindowUnit, int sstableWindowSize, SizeTieredCompactionStrategyOptions stcsOptions, long now) + static List<SSTableReader> newestBucket(HashMultimap<Long, SSTableReader> buckets, int minThreshold, int maxThreshold, SizeTieredCompactionStrategyOptions stcsOptions, long now) { // If the current bucket has at least minThreshold SSTables, choose that one. // For any other bucket, at least 2 SSTables is enough. http://git-wip-us.apache.org/repos/asf/cassandra/blob/27395e78/test/unit/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategyTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategyTest.java b/test/unit/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategyTest.java index 3238170..5041b31 100644 --- a/test/unit/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategyTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategyTest.java @@ -26,9 +26,6 @@ import java.util.concurrent.TimeUnit; import com.google.common.collect.HashMultimap; import com.google.common.collect.Iterables; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; - import org.junit.BeforeClass; import org.junit.Test; @@ -179,10 +176,10 @@ public class TimeWindowCompactionStrategyTest extends SchemaLoader Pair<Long,Long> bounds = getWindowBoundsInMillis(TimeUnit.HOURS, 1, tstamp ); buckets.put(bounds.left, sstrs.get(i)); } - List<SSTableReader> newBucket = newestBucket(buckets, 4, 32, TimeUnit.HOURS, 1, new SizeTieredCompactionStrategyOptions(), getWindowBoundsInMillis(TimeUnit.HOURS, 1, System.currentTimeMillis()).left ); + List<SSTableReader> newBucket = newestBucket(buckets, 4, 32, new SizeTieredCompactionStrategyOptions(), getWindowBoundsInMillis(TimeUnit.HOURS, 1, System.currentTimeMillis()).left ); assertTrue("incoming bucket should not be accepted when it has below the min threshold SSTables", newBucket.isEmpty()); - newBucket = newestBucket(buckets, 2, 32, TimeUnit.HOURS, 1, new SizeTieredCompactionStrategyOptions(), getWindowBoundsInMillis(TimeUnit.HOURS, 1, System.currentTimeMillis()).left); + newBucket = newestBucket(buckets, 2, 32, new SizeTieredCompactionStrategyOptions(), getWindowBoundsInMillis(TimeUnit.HOURS, 1, System.currentTimeMillis()).left); assertTrue("incoming bucket should be accepted when it is larger than the min threshold SSTables", !newBucket.isEmpty()); // And 2 into the second bucket (1 hour back) @@ -218,7 +215,7 @@ public class TimeWindowCompactionStrategyTest extends SchemaLoader buckets.put(bounds.left, sstrs.get(i)); } - newBucket = newestBucket(buckets, 4, 32, TimeUnit.DAYS, 1, new SizeTieredCompactionStrategyOptions(), getWindowBoundsInMillis(TimeUnit.HOURS, 1, System.currentTimeMillis()).left); + newBucket = newestBucket(buckets, 4, 32, new SizeTieredCompactionStrategyOptions(), getWindowBoundsInMillis(TimeUnit.HOURS, 1, System.currentTimeMillis()).left); assertEquals("new bucket should be trimmed to max threshold of 32", newBucket.size(), 32); }
