You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/01/03 16:31:59 UTC
[2/2] git commit: Reset min/max compaction threshold when creating
SizeTieredCompaction strategy
Reset min/max compaction threshold when creating SizeTieredCompaction strategy
patch by jbellis; reviewed by slebresne for CASSANDRA-3666
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a1f156dd
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a1f156dd
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a1f156dd
Branch: refs/heads/cassandra-1.0
Commit: a1f156ddf80b0ae374028cd1e981400970e208f0
Parents: 6eac35c
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Jan 3 16:29:28 2012 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Jan 3 16:29:28 2012 +0100
----------------------------------------------------------------------
.../compaction/SizeTieredCompactionStrategy.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1f156dd/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
index e8c5c6f..6f6adbc 100644
--- a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
@@ -40,10 +40,12 @@ public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
public SizeTieredCompactionStrategy(ColumnFamilyStore cfs, Map<String, String> options)
{
- super(cfs, options);
- this.estimatedRemainingTasks = 0;
- String optionValue = options.get(MIN_SSTABLE_SIZE_KEY);
- minSSTableSize = (null != optionValue) ? Long.parseLong(optionValue) : DEFAULT_MIN_SSTABLE_SIZE;
+ super(cfs, options);
+ this.estimatedRemainingTasks = 0;
+ String optionValue = options.get(MIN_SSTABLE_SIZE_KEY);
+ minSSTableSize = (null != optionValue) ? Long.parseLong(optionValue) : DEFAULT_MIN_SSTABLE_SIZE;
+ cfs.setMaximumCompactionThreshold(cfs.metadata.getMaxCompactionThreshold());
+ cfs.setMinimumCompactionThreshold(cfs.metadata.getMinCompactionThreshold());
}
public List<AbstractCompactionTask> getBackgroundTasks(final int gcBefore)