cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: fix default bloom_filter_fp_chance for LeveledCompactionStrategy; patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for CASSANDRA-5093
Date Fri, 28 Dec 2012 15:31:07 GMT
Updated Branches:
  refs/heads/cassandra-1.2.0 14d62ab11 -> 1772b1c2e


fix default bloom_filter_fp_chance for LeveledCompactionStrategy;
patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for
CASSANDRA-5093


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

Branch: refs/heads/cassandra-1.2.0
Commit: 1772b1c2ecea1f2a167aef2c572d5543cd3ea4a0
Parents: 14d62ab
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Fri Dec 28 18:29:19 2012 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Fri Dec 28 18:29:19 2012 +0300

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |   22 ++-------------
 2 files changed, 4 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1772b1c2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 31563c6..f83009e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.2.0
  * Disallow counters in collections (CASSANDRA-5082)
  * cqlsh: add unit tests (CASSANDRA-3920)
+ * fix default bloom_filter_fp_chance for LeveledCompactionStrategy (CASSANDRA-5093)
 
 
 1.2.0-rc2

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1772b1c2/src/java/org/apache/cassandra/cql3/CFPropDefs.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/CFPropDefs.java b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
index de613a3..2cbcfde 100644
--- a/src/java/org/apache/cassandra/cql3/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
@@ -23,10 +23,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.db.compaction.AbstractCompactionStrategy;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
-import org.apache.cassandra.db.ConsistencyLevel;
-import org.apache.cassandra.db.compaction.AbstractCompactionStrategy;
 import org.apache.cassandra.io.compress.CompressionParameters;
 
 public class CFPropDefs extends PropertyDefinitions
@@ -117,7 +116,6 @@ public class CFPropDefs extends PropertyDefinitions
         cfm.minCompactionThreshold(toInt(KW_MINCOMPACTIONTHRESHOLD, getCompactionOptions().get(KW_MINCOMPACTIONTHRESHOLD),
cfm.getMinCompactionThreshold()));
         cfm.maxCompactionThreshold(toInt(KW_MAXCOMPACTIONTHRESHOLD, getCompactionOptions().get(KW_MAXCOMPACTIONTHRESHOLD),
cfm.getMaxCompactionThreshold()));
         cfm.caching(CFMetaData.Caching.fromString(getString(KW_CACHING, cfm.getCaching().toString())));
-        cfm.bloomFilterFpChance(getDouble(KW_BF_FP_CHANCE, cfm.getBloomFilterFpChance()));
 
         if (compactionStrategyClass != null)
         {
@@ -125,26 +123,12 @@ public class CFPropDefs extends PropertyDefinitions
             cfm.compactionStrategyOptions(new HashMap<String, String>(getCompactionOptions()));
         }
 
+        cfm.bloomFilterFpChance(getDouble(KW_BF_FP_CHANCE, cfm.getBloomFilterFpChance()));
+
         if (!getCompressionOptions().isEmpty())
             cfm.compressionParameters(CompressionParameters.create(getCompressionOptions()));
     }
 
-    public ConsistencyLevel getConsistencyLevel(String key) throws ConfigurationException,
SyntaxException
-    {
-        String value = getSimple(key);
-        if (value == null)
-            return null;
-
-        try
-        {
-            return Enum.valueOf(ConsistencyLevel.class, value);
-        }
-        catch (IllegalArgumentException e)
-        {
-            throw new ConfigurationException(String.format("Invalid consistency level value:
%s", value));
-        }
-    }
-
     @Override
     public String toString()
     {


Mime
View raw message