mirror of https://github.com/apache/cassandra
Remove left-over populate_io_cache_on_flush and replicate_on_write uses
patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for CASSANDRA-7493
This commit is contained in:
parent
28164849cc
commit
92cb551ae3
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"|
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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>')]
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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,"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue