Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 59ba098d2 -> 4b43684ac


Fix setting min/max_compaction_threshold through cassandra-cli

Patch by Stefania Alborghetti; reviewed by Tyler Hobbs for
CASSANDRA-8102


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

Branch: refs/heads/cassandra-2.0
Commit: 4b43684ac0391a4b07e884da1c24f65dec6cd933
Parents: 59ba098
Author: Stefania Alborghetti <[email protected]>
Authored: Wed Apr 8 13:09:14 2015 -0500
Committer: Tyler Hobbs <[email protected]>
Committed: Wed Apr 8 13:09:14 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                      | 2 ++
 src/java/org/apache/cassandra/cli/CliClient.java | 3 +++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b43684a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8815a92..d52aac7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.15:
+ * Fix updates to min/max_compaction_threshold throuch cassandra-cli
+   (CASSANDRA-8102)
  * Backport CASSANDRA-6863 without digest updates (CASSANDRA-8989)
  * Don't include tmp files when doing offline relevel (CASSANDRA-9088)
  * Use the proper CAS WriteType when finishing a previous round during Paxos

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b43684a/src/java/org/apache/cassandra/cli/CliClient.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java 
b/src/java/org/apache/cassandra/cli/CliClient.java
index 6d8aa2e..b1f2673 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -32,6 +32,7 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.Iterables;
 
+import org.apache.cassandra.cql3.statements.CFPropDefs;
 import org.apache.cassandra.serializers.MarshalException;
 import org.apache.commons.lang3.StringUtils;
 
@@ -1318,12 +1319,14 @@ public class CliClient
                 if (threshold <= 0)
                     throw new RuntimeException("Disabling compaction by 
setting min/max compaction thresholds to 0 has been deprecated, set 
compaction_strategy_options={'enabled':false} instead");
                 cfDef.setMin_compaction_threshold(threshold);
+                
cfDef.putToCompaction_strategy_options(CFPropDefs.KW_MINCOMPACTIONTHRESHOLD, 
Integer.toString(threshold));
                 break;
             case MAX_COMPACTION_THRESHOLD:
                 threshold = Integer.parseInt(mValue);
                 if (threshold <= 0)
                     throw new RuntimeException("Disabling compaction by 
setting min/max compaction thresholds to 0 has been deprecated, set 
compaction_strategy_options={'enabled':false} instead");
                 cfDef.setMax_compaction_threshold(Integer.parseInt(mValue));
+                
cfDef.putToCompaction_strategy_options(CFPropDefs.KW_MAXCOMPACTIONTHRESHOLD, 
Integer.toString(threshold));
                 break;
             case REPLICATE_ON_WRITE:
                 cfDef.setReplicate_on_write(Boolean.parseBoolean(mValue));

Reply via email to