Merge branch 'cassandra-2.1' into trunk

Conflicts:
	doc/cql/CQL.textile
	src/java/org/apache/cassandra/cql/CFPropDefs.java
This commit is contained in:
Aleksey Yeschenko 2014-07-03 21:41:28 +03:00
commit f20b097821
9 changed files with 5 additions and 41 deletions

View File

@ -18,6 +18,8 @@
* Optimise NativeCell comparisons (CASSANDRA-6755) * Optimise NativeCell comparisons (CASSANDRA-6755)
2.1.0 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) * (Windows) handle spaces in path names (CASSANDRA-7451)
* Ensure writes have completed after dropping a table, before recycling * Ensure writes have completed after dropping a table, before recycling
commit log segments (CASSANDRA-7437) commit log segments (CASSANDRA-7437)

View File

@ -49,11 +49,6 @@ hinted_handoff_throttle_in_kb: 1024
# cross-dc handoff tends to be slower # cross-dc handoff tends to be slower
max_hints_delivery_threads: 2 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 # authentication backend, implementing IAuthenticator; used to identify users
authenticator: org.apache.cassandra.auth.AllowAllAuthenticator authenticator: org.apache.cassandra.auth.AllowAllAuthenticator

View File

@ -64,7 +64,6 @@ class Cql3ParsingRuleSet(CqlParsingRuleSet):
('min_index_interval', None), ('min_index_interval', None),
('max_index_interval', None), ('max_index_interval', None),
('read_repair_chance', None), ('read_repair_chance', None),
('populate_io_cache_on_flush', None),
('default_time_to_live', None), ('default_time_to_live', None),
('speculative_retry', None), ('speculative_retry', None),
('memtable_flush_period_in_ms', 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', if this_opt in ('read_repair_chance', 'bloom_filter_fp_chance',
'dclocal_read_repair_chance'): 'dclocal_read_repair_chance'):
return [Hint('<float_between_0_and_1>')] 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', if this_opt in ('min_compaction_threshold', 'max_compaction_threshold',
'gc_grace_seconds', 'min_index_interval', 'max_index_interval'): 'gc_grace_seconds', 'min_index_interval', 'max_index_interval'):
return [Hint('<integer>')] return [Hint('<integer>')]

View File

@ -1816,11 +1816,9 @@ public class CliClient
writeAttr(output, false, "read_repair_chance", cfDef.read_repair_chance); 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, "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, "gc_grace", cfDef.gc_grace_seconds);
writeAttr(output, false, "min_compaction_threshold", cfDef.min_compaction_threshold); writeAttr(output, false, "min_compaction_threshold", cfDef.min_compaction_threshold);
writeAttr(output, false, "max_compaction_threshold", cfDef.max_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, "compaction_strategy", cfDef.compaction_strategy);
writeAttr(output, false, "caching", cfDef.caching); writeAttr(output, false, "caching", cfDef.caching);
writeAttr(output, false, "cells_per_row_to_cache", cfDef.cells_per_row_to_cache); 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(" 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(" 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(" 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(" Caching: %s%n", cf_def.caching);
sessionState.out.printf(" Default time to live: %s%n", cf_def.default_time_to_live); 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"); sessionState.out.printf(" Bloom Filter FP chance: %s%n", cf_def.isSetBloom_filter_fp_chance() ? cf_def.bloom_filter_fp_chance : "default");

View File

@ -177,7 +177,6 @@ public final class CFMetaData
+ "column_aliases text," + "column_aliases text,"
+ "compaction_strategy_options text," + "compaction_strategy_options text,"
+ "speculative_retry text," + "speculative_retry text,"
+ "populate_io_cache_on_flush boolean,"
+ "index_interval int," + "index_interval int,"
+ "min_index_interval int," + "min_index_interval int,"
+ "max_index_interval int," + "max_index_interval int,"

View File

@ -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_MIN_INDEX_INTERVAL = "min_index_interval";
public static final String KW_MAX_INDEX_INTERVAL = "max_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_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_BF_FP_CHANCE = "bloom_filter_fp_chance";
public static final String KW_MEMTABLE_FLUSH_PERIOD = "memtable_flush_period_in_ms"; 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_MIN_INDEX_INTERVAL);
keywords.add(KW_MAX_INDEX_INTERVAL); keywords.add(KW_MAX_INDEX_INTERVAL);
keywords.add(KW_SPECULATIVE_RETRY); keywords.add(KW_SPECULATIVE_RETRY);
keywords.add(KW_POPULATE_IO_CACHE_ON_FLUSH);
keywords.add(KW_BF_FP_CHANCE); keywords.add(KW_BF_FP_CHANCE);
keywords.add(KW_COMPACTION); keywords.add(KW_COMPACTION);
keywords.add(KW_COMPRESSION); keywords.add(KW_COMPRESSION);
@ -74,6 +72,7 @@ public class CFPropDefs extends PropertyDefinitions
obsoleteKeywords.add("index_interval"); obsoleteKeywords.add("index_interval");
obsoleteKeywords.add("replicate_on_write"); obsoleteKeywords.add("replicate_on_write");
obsoleteKeywords.add("populate_io_cache_on_flush");
} }
private Class<? extends AbstractCompactionStrategy> compactionStrategyClass = null; private Class<? extends AbstractCompactionStrategy> compactionStrategyClass = null;

View File

@ -541,12 +541,6 @@ commands:
boundaries are the number of tables Cassandra attempts to merge together at boundaries are the number of tables Cassandra attempts to merge together at
once. 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. - compression_options: Options related to compression.
Options have the form {key:value}. Options have the form {key:value}.
The main recognized options are: The main recognized options are:
@ -838,12 +832,6 @@ commands:
boundaries are the number of tables Cassandra attempts to merge together at boundaries are the number of tables Cassandra attempts to merge together at
once. 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. - compression_options: Options related to compression.
Options have the form {key:value}. Options have the form {key:value}.
The main recognized options are: The main recognized options are:

View File

@ -67,7 +67,6 @@ public class Legacy implements Serializable
availableOptions.addOption("x", "create-index", true, "Type of index to create on needed column families (KEYS)"); 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("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("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("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("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"); availableOptions.addOption("I", "compression", true, "Specify the compression to use for sstable, default:no compression");
@ -237,9 +236,6 @@ public class Legacy implements Serializable
else else
r.add("-mode", "thrift"); r.add("-mode", "thrift");
if (cmd.hasOption("W"))
r.add("-schema", "no-replicate-on-write");
if (cmd.hasOption("I")) if (cmd.hasOption("I"))
r.add("-schema", "compression=" + cmd.getOptionValue("I")); r.add("-schema", "compression=" + cmd.getOptionValue("I"));

View File

@ -1,4 +1,3 @@
package org.apache.cassandra.stress.settings;
/* /*
* *
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
@ -19,14 +18,12 @@ package org.apache.cassandra.stress.settings;
* under the License. * under the License.
* *
*/ */
package org.apache.cassandra.stress.settings;
import java.io.Serializable; import java.io.Serializable;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.*; import java.util.*;
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.cassandra.thrift.*; import org.apache.cassandra.thrift.*;
import org.apache.cassandra.utils.ByteBufferUtil; import org.apache.cassandra.utils.ByteBufferUtil;
@ -40,7 +37,6 @@ public class SettingsSchema implements Serializable
private final Map<String, String> replicationStrategyOptions; private final Map<String, String> replicationStrategyOptions;
private final IndexType indexType; private final IndexType indexType;
private final boolean replicateOnWrite;
private final String compression; private final String compression;
private final String compactionStrategy; private final String compactionStrategy;
private final Map<String, String> compactionStrategyOptions; private final Map<String, String> compactionStrategyOptions;
@ -48,7 +44,6 @@ public class SettingsSchema implements Serializable
public SettingsSchema(Options options) public SettingsSchema(Options options)
{ {
replicateOnWrite = !options.noReplicateOnWrite.setByUser();
replicationStrategy = options.replication.getStrategy(); replicationStrategy = options.replication.getStrategy();
replicationStrategyOptions = options.replication.getOptions(); replicationStrategyOptions = options.replication.getOptions();
if (options.index.setByUser()) if (options.index.setByUser())
@ -112,14 +107,12 @@ public class SettingsSchema implements Serializable
CfDef counterCfDef = new CfDef(keyspace, "Counter1") CfDef counterCfDef = new CfDef(keyspace, "Counter1")
.setComparator_type(comparator) .setComparator_type(comparator)
.setDefault_validation_class("CounterColumnType") .setDefault_validation_class("CounterColumnType")
.setReplicate_on_write(replicateOnWrite)
.setCompression_options(compressionOptions); .setCompression_options(compressionOptions);
// column family with counter super columns // column family with counter super columns
CfDef counterSuperCfDef = new CfDef(keyspace, "SuperCounter1") CfDef counterSuperCfDef = new CfDef(keyspace, "SuperCounter1")
.setComparator_type(comparator) .setComparator_type(comparator)
.setDefault_validation_class("CounterColumnType") .setDefault_validation_class("CounterColumnType")
.setReplicate_on_write(replicateOnWrite)
.setColumn_type("Super") .setColumn_type("Super")
.setCompression_options(compressionOptions); .setCompression_options(compressionOptions);
@ -200,13 +193,12 @@ public class SettingsSchema implements Serializable
final OptionCompaction compaction = new OptionCompaction(); 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 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 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); final OptionSimple compression = new OptionSimple("compression=", ".*", null, "Specify the compression to use for sstable, default:no compression", false);
@Override @Override
public List<? extends Option> options() public List<? extends Option> options()
{ {
return Arrays.asList(replication, index, keyspace, compaction, noReplicateOnWrite, compression); return Arrays.asList(replication, index, keyspace, compaction, compression);
} }
} }