cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Remove left-over populate_io_cache_on_flush and replicate_on_write uses
Date Thu, 03 Jul 2014 18:38:02 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 9a6cdf148 -> 3be63ddad


Remove left-over populate_io_cache_on_flush and replicate_on_write uses

patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for CASSANDRA-7493


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

Branch: refs/heads/cassandra-2.1
Commit: 92cb551ae3787d3d1e33d6e2eb5571d045a2a21b
Parents: 2816484
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Thu Jul 3 21:35:39 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Thu Jul 3 21:35:39 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 doc/cql/CQL.textile                                     |  1 -
 examples/client_only/conf/cassandra.yaml                |  5 -----
 pylib/cqlshlib/cql3handling.py                          |  3 ---
 src/java/org/apache/cassandra/cli/CliClient.java        |  4 ----
 src/java/org/apache/cassandra/config/CFMetaData.java    |  1 -
 src/java/org/apache/cassandra/cql/CFPropDefs.java       |  3 +--
 .../apache/cassandra/cql3/statements/CFPropDefs.java    |  3 +--
 src/resources/org/apache/cassandra/cli/CliHelp.yaml     | 12 ------------
 .../org/apache/cassandra/stress/settings/Legacy.java    |  4 ----
 .../cassandra/stress/settings/SettingsSchema.java       | 12 ++----------
 11 files changed, 6 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cd16f35..01cc224 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.0
+ * Remove left-over populate_io_cache_on_flush and replicate_on_write
+   uses (CASSANDRA-7493)
  * (Windows) handle spaces in path names (CASSANDRA-7451)
  * Ensure writes have completed after dropping a table, before recycling
    commit log segments (CASSANDRA-7437)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/doc/cql/CQL.textile
----------------------------------------------------------------------
diff --git a/doc/cql/CQL.textile b/doc/cql/CQL.textile
index 1cfe883..af1195e 100644
--- a/doc/cql/CQL.textile
+++ b/doc/cql/CQL.textile
@@ -548,7 +548,6 @@ A number of optional keyword arguments can be supplied to control the
configurat
 |default_validation|text|Determines the default storage type of column values (which itself
determines the validation for column values). This option does not affect the types of columns
which were defined in a @CREATE COLUMNFAMILY@ statement-- only new columns. Valid values are
listed in the "Data Storage Types":#storageTypes table above.|
 |min_compaction_threshold|4|Minimum number of SSTables needed to start a minor compaction.|
 |max_compaction_threshold|32|Maximum number of SSTables allowed before a minor compaction
is forced.|
-|replicate_on_write|false| |
 |compaction_strategy_options|none|CompactionStrategy specific options such as "sstable_size_in_mb"
for LeveledCompactionStrategy and "min_sstable_size" for SizeTieredCompactionStrategy|
 |compression_parameters|none|Compression parameters such as "sstable_compressor" and "chunk_length_kb"|
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/examples/client_only/conf/cassandra.yaml
----------------------------------------------------------------------
diff --git a/examples/client_only/conf/cassandra.yaml b/examples/client_only/conf/cassandra.yaml
index f372dbf..a6b3b43 100644
--- a/examples/client_only/conf/cassandra.yaml
+++ b/examples/client_only/conf/cassandra.yaml
@@ -49,11 +49,6 @@ hinted_handoff_throttle_in_kb: 1024
 # cross-dc handoff tends to be slower
 max_hints_delivery_threads: 2
 
-# The following setting populates the page cache on memtable flush and compaction
-# WARNING: Enable this setting only when the whole node's data fits in memory.
-# Defaults to: false
-# populate_io_cache_on_flush: false
-
 # authentication backend, implementing IAuthenticator; used to identify users
 authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index a99e8e6..3d489d3 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -64,7 +64,6 @@ class Cql3ParsingRuleSet(CqlParsingRuleSet):
         ('min_index_interval', None),
         ('max_index_interval', None),
         ('read_repair_chance', None),
-        ('populate_io_cache_on_flush', None),
         ('default_time_to_live', None),
         ('speculative_retry', None),
         ('memtable_flush_period_in_ms', None),
@@ -435,8 +434,6 @@ def cf_prop_val_completer(ctxt, cass):
     if this_opt in ('read_repair_chance', 'bloom_filter_fp_chance',
                     'dclocal_read_repair_chance'):
         return [Hint('<float_between_0_and_1>')]
-    if this_opt in ('replicate_on_write', 'populate_io_cache_on_flush'):
-        return ["'yes'", "'no'"]
     if this_opt in ('min_compaction_threshold', 'max_compaction_threshold',
                     'gc_grace_seconds', 'min_index_interval', 'max_index_interval'):
         return [Hint('<integer>')]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/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 ab6a221..c6b3bcd 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -1816,11 +1816,9 @@ public class CliClient
 
         writeAttr(output, false, "read_repair_chance", cfDef.read_repair_chance);
         writeAttr(output, false, "dclocal_read_repair_chance", cfDef.dclocal_read_repair_chance);
-        writeAttr(output, false, "populate_io_cache_on_flush", cfDef.populate_io_cache_on_flush);
         writeAttr(output, false, "gc_grace", cfDef.gc_grace_seconds);
         writeAttr(output, false, "min_compaction_threshold", cfDef.min_compaction_threshold);
         writeAttr(output, false, "max_compaction_threshold", cfDef.max_compaction_threshold);
-        writeAttr(output, false, "replicate_on_write", cfDef.replicate_on_write);
         writeAttr(output, false, "compaction_strategy", cfDef.compaction_strategy);
         writeAttr(output, false, "caching", cfDef.caching);
         writeAttr(output, false, "cells_per_row_to_cache", cfDef.cells_per_row_to_cache);
@@ -2189,8 +2187,6 @@ public class CliClient
         sessionState.out.printf("      Compaction min/max thresholds: %s/%s%n", cf_def.min_compaction_threshold,
cf_def.max_compaction_threshold);
         sessionState.out.printf("      Read repair chance: %s%n", cf_def.read_repair_chance);
         sessionState.out.printf("      DC Local Read repair chance: %s%n", cf_def.dclocal_read_repair_chance);
-        sessionState.out.printf("      Populate IO Cache on flush: %b%n", cf_def.populate_io_cache_on_flush);
-        sessionState.out.printf("      Replicate on write: %s%n", cf_def.replicate_on_write);
         sessionState.out.printf("      Caching: %s%n", cf_def.caching);
         sessionState.out.printf("      Default time to live: %s%n", cf_def.default_time_to_live);
         sessionState.out.printf("      Bloom Filter FP chance: %s%n", cf_def.isSetBloom_filter_fp_chance()
? cf_def.bloom_filter_fp_chance : "default");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index dd3d079..84804b0 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -177,7 +177,6 @@ public final class CFMetaData
                                                                     + "column_aliases text,"
                                                                     + "compaction_strategy_options
text,"
                                                                     + "speculative_retry
text,"
-                                                                    + "populate_io_cache_on_flush
boolean,"
                                                                     + "index_interval int,"
                                                                     + "min_index_interval
int,"
                                                                     + "max_index_interval
int,"

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/src/java/org/apache/cassandra/cql/CFPropDefs.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/CFPropDefs.java b/src/java/org/apache/cassandra/cql/CFPropDefs.java
index 42e840e..f65cb94 100644
--- a/src/java/org/apache/cassandra/cql/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql/CFPropDefs.java
@@ -52,7 +52,6 @@ public class CFPropDefs {
     public static final String KW_ROWS_PER_PARTITION_TO_CACHE = "rows_per_partition_to_cache";
     public static final String KW_DEFAULT_TIME_TO_LIVE = "default_time_to_live";
     public static final String KW_SPECULATIVE_RETRY = "speculative_retry";
-    public static final String KW_POPULATE_IO_CACHE_ON_FLUSH = "populate_io_cache_on_flush";
     public static final String KW_BF_FP_CHANCE = "bloom_filter_fp_chance";
     public static final String KW_MEMTABLE_FLUSH_PERIOD = "memtable_flush_period_in_ms";
 
@@ -95,7 +94,6 @@ public class CFPropDefs {
         keywords.add(KW_ROWS_PER_PARTITION_TO_CACHE);
         keywords.add(KW_DEFAULT_TIME_TO_LIVE);
         keywords.add(KW_SPECULATIVE_RETRY);
-        keywords.add(KW_POPULATE_IO_CACHE_ON_FLUSH);
         keywords.add(KW_BF_FP_CHANCE);
         keywords.add(KW_MEMTABLE_FLUSH_PERIOD);
 
@@ -108,6 +106,7 @@ public class CFPropDefs {
         obsoleteKeywords.add("memtable_flush_after_mins");
         obsoleteKeywords.add("row_cache_provider");
         obsoleteKeywords.add("replicate_on_write");
+        obsoleteKeywords.add("populate_io_cache_on_flush");
 
         allowedKeywords.addAll(keywords);
         allowedKeywords.addAll(obsoleteKeywords);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java b/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java
index 486fc9a..aee86a8 100644
--- a/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java
@@ -43,7 +43,6 @@ public class CFPropDefs extends PropertyDefinitions
     public static final String KW_MIN_INDEX_INTERVAL = "min_index_interval";
     public static final String KW_MAX_INDEX_INTERVAL = "max_index_interval";
     public static final String KW_SPECULATIVE_RETRY = "speculative_retry";
-    public static final String KW_POPULATE_IO_CACHE_ON_FLUSH = "populate_io_cache_on_flush";
     public static final String KW_BF_FP_CHANCE = "bloom_filter_fp_chance";
     public static final String KW_MEMTABLE_FLUSH_PERIOD = "memtable_flush_period_in_ms";
 
@@ -66,7 +65,6 @@ public class CFPropDefs extends PropertyDefinitions
         keywords.add(KW_MIN_INDEX_INTERVAL);
         keywords.add(KW_MAX_INDEX_INTERVAL);
         keywords.add(KW_SPECULATIVE_RETRY);
-        keywords.add(KW_POPULATE_IO_CACHE_ON_FLUSH);
         keywords.add(KW_BF_FP_CHANCE);
         keywords.add(KW_COMPACTION);
         keywords.add(KW_COMPRESSION);
@@ -74,6 +72,7 @@ public class CFPropDefs extends PropertyDefinitions
 
         obsoleteKeywords.add("index_interval");
         obsoleteKeywords.add("replicate_on_write");
+        obsoleteKeywords.add("populate_io_cache_on_flush");
     }
 
     private Class<? extends AbstractCompactionStrategy> compactionStrategyClass = null;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/src/resources/org/apache/cassandra/cli/CliHelp.yaml
----------------------------------------------------------------------
diff --git a/src/resources/org/apache/cassandra/cli/CliHelp.yaml b/src/resources/org/apache/cassandra/cli/CliHelp.yaml
index 3c167bc..cc838f8 100644
--- a/src/resources/org/apache/cassandra/cli/CliHelp.yaml
+++ b/src/resources/org/apache/cassandra/cli/CliHelp.yaml
@@ -541,12 +541,6 @@ commands:
         boundaries are the number of tables Cassandra attempts to merge together at
         once.
 
-        - replicate_on_write: Replicate every counter update from the leader to the
-        follower replicas. Accepts the values true and false.
-
-        - populate_io_cache_on_flush: Populates the page cache on memtable flush
-        and compaction. Accepts the values true and false.
-
         - compression_options: Options related to compression.
           Options have the form {key:value}.
           The main recognized options are:
@@ -838,12 +832,6 @@ commands:
         boundaries are the number of tables Cassandra attempts to merge together at
         once.
 
-        - replicate_on_write: Replicate every counter update from the leader to the
-        follower replicas. Accepts the values true and false.
-
-        - populate_io_cache_on_flush: Populates the page cache on memtable flush
-        and compaction. Accepts the values true and false.
-
         - compression_options: Options related to compression.
           Options have the form {key:value}.
           The main recognized options are:

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java b/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java
index 5c793e6..7f17893 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java
@@ -68,7 +68,6 @@ public class Legacy implements Serializable
         availableOptions.addOption("x",  "create-index",         true,   "Type of index to
create on needed column families (KEYS)");
         availableOptions.addOption("R",  "replication-strategy", true,   "Replication strategy
to use (only on insert if keyspace does not exist), default:org.apache.cassandra.locator.SimpleStrategy");
         availableOptions.addOption("O",  "strategy-properties",  true,   "Replication strategy
properties in the following format <dc_name>:<num>,<dc_name>:<num>,...");
-        availableOptions.addOption("W",  "no-replicate-on-write",false,  "Set replicate_on_write
to false for counters. Only counter add with CL=ONE will work");
         availableOptions.addOption("V",  "average-size-values",  false,  "Generate column
values of average rather than specific size");
         availableOptions.addOption("T",  "send-to",              true,   "Send this as a
request to the stress daemon at specified address.");
         availableOptions.addOption("I",  "compression",          true,   "Specify the compression
to use for sstable, default:no compression");
@@ -240,9 +239,6 @@ public class Legacy implements Serializable
             else
                 r.add("-mode", "thrift");
 
-            if (cmd.hasOption("W"))
-                r.add("-schema", "no-replicate-on-write");
-
             if (cmd.hasOption("I"))
                 r.add("-schema", "compression=" + cmd.getOptionValue("I"));
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92cb551a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java
index 33af446..ffafb67 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java
@@ -1,4 +1,3 @@
-package org.apache.cassandra.stress.settings;
 /*
  * 
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,14 +18,12 @@ package org.apache.cassandra.stress.settings;
  * under the License.
  * 
  */
-
+package org.apache.cassandra.stress.settings;
 
 import java.io.Serializable;
 import java.nio.ByteBuffer;
 import java.util.*;
 
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
@@ -40,7 +37,6 @@ public class SettingsSchema implements Serializable
     private final Map<String, String> replicationStrategyOptions;
 
     private final IndexType indexType;
-    private final boolean replicateOnWrite;
     private final String compression;
     private final String compactionStrategy;
     private final Map<String, String> compactionStrategyOptions;
@@ -48,7 +44,6 @@ public class SettingsSchema implements Serializable
 
     public SettingsSchema(Options options)
     {
-        replicateOnWrite = !options.noReplicateOnWrite.setByUser();
         replicationStrategy = options.replication.getStrategy();
         replicationStrategyOptions = options.replication.getOptions();
         if (options.index.setByUser())
@@ -112,14 +107,12 @@ public class SettingsSchema implements Serializable
         CfDef counterCfDef = new CfDef(keyspace, "Counter1")
                 .setComparator_type(comparator)
                 .setDefault_validation_class("CounterColumnType")
-                .setReplicate_on_write(replicateOnWrite)
                 .setCompression_options(compressionOptions);
 
         // column family with counter super columns
         CfDef counterSuperCfDef = new CfDef(keyspace, "SuperCounter1")
                 .setComparator_type(comparator)
                 .setDefault_validation_class("CounterColumnType")
-                .setReplicate_on_write(replicateOnWrite)
                 .setColumn_type("Super")
                 .setCompression_options(compressionOptions);
 
@@ -200,13 +193,12 @@ public class SettingsSchema implements Serializable
         final OptionCompaction compaction = new OptionCompaction();
         final OptionSimple index = new OptionSimple("index=", "KEYS|CUSTOM|COMPOSITES", null,
"Type of index to create on needed column families (KEYS)", false);
         final OptionSimple keyspace = new OptionSimple("keyspace=", ".*", "Keyspace1", "The
keyspace name to use", false);
-        final OptionSimple noReplicateOnWrite = new OptionSimple("no-replicate-on-write",
"", null, "Set replicate_on_write to false for counters. Only counter add with CL=ONE will
work", false);
         final OptionSimple compression = new OptionSimple("compression=", ".*", null, "Specify
the compression to use for sstable, default:no compression", false);
 
         @Override
         public List<? extends Option> options()
         {
-            return Arrays.asList(replication, index, keyspace, compaction, noReplicateOnWrite,
compression);
+            return Arrays.asList(replication, index, keyspace, compaction, compression);
         }
     }
 


Mime
View raw message