Allow populate_io_cache_on_flush to be set per-CF.

Patch by Alexey Zotov, reviewed by brandwonwilliams for CASSANDRA-4694
This commit is contained in:
Brandon Williams 2013-01-31 15:08:41 -06:00
parent 639b314d2e
commit 22f515b376
55 changed files with 268 additions and 126 deletions

View File

@ -10,6 +10,7 @@
* fix bug in compact storage metadata handling (CASSANDRA-5189)
* Validate login for USE queries (CASSANDRA-5207)
* cli: remove default username and password (CASSANDRA-5208)
* configure populate_io_cache_on_flush per-CF (CASSANDRA-4694)
1.2.1

View File

@ -386,6 +386,8 @@ request_scheduler: org.apache.cassandra.scheduler.NoScheduler
# days). See http://wiki.apache.org/cassandra/DistributedDeletes
# - default_validation_class: specifies a validator class to use for
# validating all the column values in the CF.
# - populate_io_cache_on_flush: populates the page cache on memtable flush
# and compaction. Defaults to false.
# NOTE:
# min_ must be less than max_compaction_threshold!
# - min_compaction_threshold: the minimum number of SSTables needed

View File

@ -442,10 +442,11 @@ struct CfDef {
33: optional double bloom_filter_fp_chance,
34: optional string caching="keys_only",
37: optional double dclocal_read_repair_chance = 0.0,
38: optional i32 memtable_flush_period_in_ms,
39: optional i32 default_time_to_live,
40: optional i32 index_interval,
41: optional string speculative_retry="NONE",
38: optional bool populate_io_cache_on_flush,
39: optional i32 memtable_flush_period_in_ms,
40: optional i32 default_time_to_live,
41: optional i32 index_interval,
42: optional string speculative_retry="NONE",
/* All of the following are now ignored and unsupplied. */

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -77,10 +77,11 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
private static final org.apache.thrift.protocol.TField BLOOM_FILTER_FP_CHANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloom_filter_fp_chance", org.apache.thrift.protocol.TType.DOUBLE, (short)33);
private static final org.apache.thrift.protocol.TField CACHING_FIELD_DESC = new org.apache.thrift.protocol.TField("caching", org.apache.thrift.protocol.TType.STRING, (short)34);
private static final org.apache.thrift.protocol.TField DCLOCAL_READ_REPAIR_CHANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("dclocal_read_repair_chance", org.apache.thrift.protocol.TType.DOUBLE, (short)37);
private static final org.apache.thrift.protocol.TField MEMTABLE_FLUSH_PERIOD_IN_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("memtable_flush_period_in_ms", org.apache.thrift.protocol.TType.I32, (short)38);
private static final org.apache.thrift.protocol.TField DEFAULT_TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("default_time_to_live", org.apache.thrift.protocol.TType.I32, (short)39);
private static final org.apache.thrift.protocol.TField INDEX_INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("index_interval", org.apache.thrift.protocol.TType.I32, (short)40);
private static final org.apache.thrift.protocol.TField SPECULATIVE_RETRY_FIELD_DESC = new org.apache.thrift.protocol.TField("speculative_retry", org.apache.thrift.protocol.TType.STRING, (short)41);
private static final org.apache.thrift.protocol.TField POPULATE_IO_CACHE_ON_FLUSH_FIELD_DESC = new org.apache.thrift.protocol.TField("populate_io_cache_on_flush", org.apache.thrift.protocol.TType.BOOL, (short)38);
private static final org.apache.thrift.protocol.TField MEMTABLE_FLUSH_PERIOD_IN_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("memtable_flush_period_in_ms", org.apache.thrift.protocol.TType.I32, (short)39);
private static final org.apache.thrift.protocol.TField DEFAULT_TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("default_time_to_live", org.apache.thrift.protocol.TType.I32, (short)40);
private static final org.apache.thrift.protocol.TField INDEX_INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("index_interval", org.apache.thrift.protocol.TType.I32, (short)41);
private static final org.apache.thrift.protocol.TField SPECULATIVE_RETRY_FIELD_DESC = new org.apache.thrift.protocol.TField("speculative_retry", org.apache.thrift.protocol.TType.STRING, (short)42);
private static final org.apache.thrift.protocol.TField ROW_CACHE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("row_cache_size", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
private static final org.apache.thrift.protocol.TField KEY_CACHE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("key_cache_size", org.apache.thrift.protocol.TType.DOUBLE, (short)11);
private static final org.apache.thrift.protocol.TField ROW_CACHE_SAVE_PERIOD_IN_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("row_cache_save_period_in_seconds", org.apache.thrift.protocol.TType.I32, (short)19);
@ -120,6 +121,7 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
public double bloom_filter_fp_chance; // optional
public String caching; // optional
public double dclocal_read_repair_chance; // optional
public boolean populate_io_cache_on_flush; // optional
public int memtable_flush_period_in_ms; // optional
public int default_time_to_live; // optional
public int index_interval; // optional
@ -189,10 +191,11 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
BLOOM_FILTER_FP_CHANCE((short)33, "bloom_filter_fp_chance"),
CACHING((short)34, "caching"),
DCLOCAL_READ_REPAIR_CHANCE((short)37, "dclocal_read_repair_chance"),
MEMTABLE_FLUSH_PERIOD_IN_MS((short)38, "memtable_flush_period_in_ms"),
DEFAULT_TIME_TO_LIVE((short)39, "default_time_to_live"),
INDEX_INTERVAL((short)40, "index_interval"),
SPECULATIVE_RETRY((short)41, "speculative_retry"),
POPULATE_IO_CACHE_ON_FLUSH((short)38, "populate_io_cache_on_flush"),
MEMTABLE_FLUSH_PERIOD_IN_MS((short)39, "memtable_flush_period_in_ms"),
DEFAULT_TIME_TO_LIVE((short)40, "default_time_to_live"),
INDEX_INTERVAL((short)41, "index_interval"),
SPECULATIVE_RETRY((short)42, "speculative_retry"),
/**
* @deprecated
*/
@ -291,13 +294,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
return CACHING;
case 37: // DCLOCAL_READ_REPAIR_CHANCE
return DCLOCAL_READ_REPAIR_CHANCE;
case 38: // MEMTABLE_FLUSH_PERIOD_IN_MS
case 38: // POPULATE_IO_CACHE_ON_FLUSH
return POPULATE_IO_CACHE_ON_FLUSH;
case 39: // MEMTABLE_FLUSH_PERIOD_IN_MS
return MEMTABLE_FLUSH_PERIOD_IN_MS;
case 39: // DEFAULT_TIME_TO_LIVE
case 40: // DEFAULT_TIME_TO_LIVE
return DEFAULT_TIME_TO_LIVE;
case 40: // INDEX_INTERVAL
case 41: // INDEX_INTERVAL
return INDEX_INTERVAL;
case 41: // SPECULATIVE_RETRY
case 42: // SPECULATIVE_RETRY
return SPECULATIVE_RETRY;
case 9: // ROW_CACHE_SIZE
return ROW_CACHE_SIZE;
@ -367,20 +372,21 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
private static final int __REPLICATE_ON_WRITE_ISSET_ID = 5;
private static final int __BLOOM_FILTER_FP_CHANCE_ISSET_ID = 6;
private static final int __DCLOCAL_READ_REPAIR_CHANCE_ISSET_ID = 7;
private static final int __MEMTABLE_FLUSH_PERIOD_IN_MS_ISSET_ID = 8;
private static final int __DEFAULT_TIME_TO_LIVE_ISSET_ID = 9;
private static final int __INDEX_INTERVAL_ISSET_ID = 10;
private static final int __ROW_CACHE_SIZE_ISSET_ID = 11;
private static final int __KEY_CACHE_SIZE_ISSET_ID = 12;
private static final int __ROW_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 13;
private static final int __KEY_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 14;
private static final int __MEMTABLE_FLUSH_AFTER_MINS_ISSET_ID = 15;
private static final int __MEMTABLE_THROUGHPUT_IN_MB_ISSET_ID = 16;
private static final int __MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID = 17;
private static final int __MERGE_SHARDS_CHANCE_ISSET_ID = 18;
private static final int __ROW_CACHE_KEYS_TO_SAVE_ISSET_ID = 19;
private static final int __POPULATE_IO_CACHE_ON_FLUSH_ISSET_ID = 8;
private static final int __MEMTABLE_FLUSH_PERIOD_IN_MS_ISSET_ID = 9;
private static final int __DEFAULT_TIME_TO_LIVE_ISSET_ID = 10;
private static final int __INDEX_INTERVAL_ISSET_ID = 11;
private static final int __ROW_CACHE_SIZE_ISSET_ID = 12;
private static final int __KEY_CACHE_SIZE_ISSET_ID = 13;
private static final int __ROW_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 14;
private static final int __KEY_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 15;
private static final int __MEMTABLE_FLUSH_AFTER_MINS_ISSET_ID = 16;
private static final int __MEMTABLE_THROUGHPUT_IN_MB_ISSET_ID = 17;
private static final int __MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID = 18;
private static final int __MERGE_SHARDS_CHANCE_ISSET_ID = 19;
private static final int __ROW_CACHE_KEYS_TO_SAVE_ISSET_ID = 20;
private int __isset_bitfield = 0;
private _Fields optionals[] = {_Fields.COLUMN_TYPE,_Fields.COMPARATOR_TYPE,_Fields.SUBCOMPARATOR_TYPE,_Fields.COMMENT,_Fields.READ_REPAIR_CHANCE,_Fields.COLUMN_METADATA,_Fields.GC_GRACE_SECONDS,_Fields.DEFAULT_VALIDATION_CLASS,_Fields.ID,_Fields.MIN_COMPACTION_THRESHOLD,_Fields.MAX_COMPACTION_THRESHOLD,_Fields.REPLICATE_ON_WRITE,_Fields.KEY_VALIDATION_CLASS,_Fields.KEY_ALIAS,_Fields.COMPACTION_STRATEGY,_Fields.COMPACTION_STRATEGY_OPTIONS,_Fields.COMPRESSION_OPTIONS,_Fields.BLOOM_FILTER_FP_CHANCE,_Fields.CACHING,_Fields.DCLOCAL_READ_REPAIR_CHANCE,_Fields.MEMTABLE_FLUSH_PERIOD_IN_MS,_Fields.DEFAULT_TIME_TO_LIVE,_Fields.INDEX_INTERVAL,_Fields.SPECULATIVE_RETRY,_Fields.ROW_CACHE_SIZE,_Fields.KEY_CACHE_SIZE,_Fields.ROW_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.KEY_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.MEMTABLE_FLUSH_AFTER_MINS,_Fields.MEMTABLE_THROUGHPUT_IN_MB,_Fields.MEMTABLE_OPERATIONS_IN_MILLIONS,_Fields.MERGE_SHARDS_CHANCE,_Fields.ROW_CACHE_PROVIDER,_Fields.ROW_CACHE_KEYS_TO_SAVE};
private _Fields optionals[] = {_Fields.COLUMN_TYPE,_Fields.COMPARATOR_TYPE,_Fields.SUBCOMPARATOR_TYPE,_Fields.COMMENT,_Fields.READ_REPAIR_CHANCE,_Fields.COLUMN_METADATA,_Fields.GC_GRACE_SECONDS,_Fields.DEFAULT_VALIDATION_CLASS,_Fields.ID,_Fields.MIN_COMPACTION_THRESHOLD,_Fields.MAX_COMPACTION_THRESHOLD,_Fields.REPLICATE_ON_WRITE,_Fields.KEY_VALIDATION_CLASS,_Fields.KEY_ALIAS,_Fields.COMPACTION_STRATEGY,_Fields.COMPACTION_STRATEGY_OPTIONS,_Fields.COMPRESSION_OPTIONS,_Fields.BLOOM_FILTER_FP_CHANCE,_Fields.CACHING,_Fields.DCLOCAL_READ_REPAIR_CHANCE,_Fields.POPULATE_IO_CACHE_ON_FLUSH,_Fields.MEMTABLE_FLUSH_PERIOD_IN_MS,_Fields.DEFAULT_TIME_TO_LIVE,_Fields.INDEX_INTERVAL,_Fields.SPECULATIVE_RETRY,_Fields.ROW_CACHE_SIZE,_Fields.KEY_CACHE_SIZE,_Fields.ROW_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.KEY_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.MEMTABLE_FLUSH_AFTER_MINS,_Fields.MEMTABLE_THROUGHPUT_IN_MB,_Fields.MEMTABLE_OPERATIONS_IN_MILLIONS,_Fields.MERGE_SHARDS_CHANCE,_Fields.ROW_CACHE_PROVIDER,_Fields.ROW_CACHE_KEYS_TO_SAVE};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@ -433,13 +439,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DCLOCAL_READ_REPAIR_CHANCE, new org.apache.thrift.meta_data.FieldMetaData("dclocal_read_repair_chance", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.POPULATE_IO_CACHE_ON_FLUSH, new org.apache.thrift.meta_data.FieldMetaData("populate_io_cache_on_flush", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.MEMTABLE_FLUSH_PERIOD_IN_MS, new org.apache.thrift.meta_data.FieldMetaData("memtable_flush_period_in_ms", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DEFAULT_TIME_TO_LIVE, new org.apache.thrift.meta_data.FieldMetaData("default_time_to_live", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.INDEX_INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("index_interval", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.SPECULATIVE_RETRY, new org.apache.thrift.meta_data.FieldMetaData("speculative_retry", org.apache.thrift.TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.SPECULATIVE_RETRY, new org.apache.thrift.meta_data.FieldMetaData("speculative_retry", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ROW_CACHE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("row_cache_size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
@ -571,6 +579,7 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
this.caching = other.caching;
}
this.dclocal_read_repair_chance = other.dclocal_read_repair_chance;
this.populate_io_cache_on_flush = other.populate_io_cache_on_flush;
this.memtable_flush_period_in_ms = other.memtable_flush_period_in_ms;
this.default_time_to_live = other.default_time_to_live;
this.index_interval = other.index_interval;
@ -630,6 +639,8 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
this.dclocal_read_repair_chance = 0;
setPopulate_io_cache_on_flushIsSet(false);
this.populate_io_cache_on_flush = false;
setMemtable_flush_period_in_msIsSet(false);
this.memtable_flush_period_in_ms = 0;
setDefault_time_to_liveIsSet(false);
@ -1226,6 +1237,29 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DCLOCAL_READ_REPAIR_CHANCE_ISSET_ID, value);
}
public boolean isPopulate_io_cache_on_flush() {
return this.populate_io_cache_on_flush;
}
public CfDef setPopulate_io_cache_on_flush(boolean populate_io_cache_on_flush) {
this.populate_io_cache_on_flush = populate_io_cache_on_flush;
setPopulate_io_cache_on_flushIsSet(true);
return this;
}
public void unsetPopulate_io_cache_on_flush() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __POPULATE_IO_CACHE_ON_FLUSH_ISSET_ID);
}
/** Returns true if field populate_io_cache_on_flush is set (has been assigned a value) and false otherwise */
public boolean isSetPopulate_io_cache_on_flush() {
return EncodingUtils.testBit(__isset_bitfield, __POPULATE_IO_CACHE_ON_FLUSH_ISSET_ID);
}
public void setPopulate_io_cache_on_flushIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __POPULATE_IO_CACHE_ON_FLUSH_ISSET_ID, value);
}
public int getMemtable_flush_period_in_ms() {
return this.memtable_flush_period_in_ms;
}
@ -1788,6 +1822,14 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
}
break;
case POPULATE_IO_CACHE_ON_FLUSH:
if (value == null) {
unsetPopulate_io_cache_on_flush();
} else {
setPopulate_io_cache_on_flush((Boolean)value);
}
break;
case MEMTABLE_FLUSH_PERIOD_IN_MS:
if (value == null) {
unsetMemtable_flush_period_in_ms();
@ -1971,6 +2013,9 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
case DCLOCAL_READ_REPAIR_CHANCE:
return Double.valueOf(getDclocal_read_repair_chance());
case POPULATE_IO_CACHE_ON_FLUSH:
return Boolean.valueOf(isPopulate_io_cache_on_flush());
case MEMTABLE_FLUSH_PERIOD_IN_MS:
return Integer.valueOf(getMemtable_flush_period_in_ms());
@ -2068,6 +2113,8 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
return isSetCaching();
case DCLOCAL_READ_REPAIR_CHANCE:
return isSetDclocal_read_repair_chance();
case POPULATE_IO_CACHE_ON_FLUSH:
return isSetPopulate_io_cache_on_flush();
case MEMTABLE_FLUSH_PERIOD_IN_MS:
return isSetMemtable_flush_period_in_ms();
case DEFAULT_TIME_TO_LIVE:
@ -2311,6 +2358,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
return false;
}
boolean this_present_populate_io_cache_on_flush = true && this.isSetPopulate_io_cache_on_flush();
boolean that_present_populate_io_cache_on_flush = true && that.isSetPopulate_io_cache_on_flush();
if (this_present_populate_io_cache_on_flush || that_present_populate_io_cache_on_flush) {
if (!(this_present_populate_io_cache_on_flush && that_present_populate_io_cache_on_flush))
return false;
if (this.populate_io_cache_on_flush != that.populate_io_cache_on_flush)
return false;
}
boolean this_present_memtable_flush_period_in_ms = true && this.isSetMemtable_flush_period_in_ms();
boolean that_present_memtable_flush_period_in_ms = true && that.isSetMemtable_flush_period_in_ms();
if (this_present_memtable_flush_period_in_ms || that_present_memtable_flush_period_in_ms) {
@ -2554,6 +2610,11 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (present_dclocal_read_repair_chance)
builder.append(dclocal_read_repair_chance);
boolean present_populate_io_cache_on_flush = true && (isSetPopulate_io_cache_on_flush());
builder.append(present_populate_io_cache_on_flush);
if (present_populate_io_cache_on_flush)
builder.append(populate_io_cache_on_flush);
boolean present_memtable_flush_period_in_ms = true && (isSetMemtable_flush_period_in_ms());
builder.append(present_memtable_flush_period_in_ms);
if (present_memtable_flush_period_in_ms)
@ -2569,6 +2630,11 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (present_index_interval)
builder.append(index_interval);
boolean present_speculative_retry = true && (isSetSpeculative_retry());
builder.append(present_speculative_retry);
if (present_speculative_retry)
builder.append(speculative_retry);
boolean present_row_cache_size = true && (isSetRow_cache_size());
builder.append(present_row_cache_size);
if (present_row_cache_size)
@ -2619,11 +2685,6 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (present_row_cache_keys_to_save)
builder.append(row_cache_keys_to_save);
boolean preset_speculative_retry = true && (isSetSpeculative_retry());
builder.append(preset_speculative_retry);
if (preset_speculative_retry)
builder.append(speculative_retry);
return builder.toHashCode();
}
@ -2855,6 +2916,16 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPopulate_io_cache_on_flush()).compareTo(typedOther.isSetPopulate_io_cache_on_flush());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPopulate_io_cache_on_flush()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.populate_io_cache_on_flush, typedOther.populate_io_cache_on_flush);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMemtable_flush_period_in_ms()).compareTo(typedOther.isSetMemtable_flush_period_in_ms());
if (lastComparison != 0) {
return lastComparison;
@ -3198,6 +3269,12 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
sb.append(this.dclocal_read_repair_chance);
first = false;
}
if (isSetPopulate_io_cache_on_flush()) {
if (!first) sb.append(", ");
sb.append("populate_io_cache_on_flush:");
sb.append(this.populate_io_cache_on_flush);
first = false;
}
if (isSetMemtable_flush_period_in_ms()) {
if (!first) sb.append(", ");
sb.append("memtable_flush_period_in_ms:");
@ -3552,7 +3629,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 38: // MEMTABLE_FLUSH_PERIOD_IN_MS
case 38: // POPULATE_IO_CACHE_ON_FLUSH
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.populate_io_cache_on_flush = iprot.readBool();
struct.setPopulate_io_cache_on_flushIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 39: // MEMTABLE_FLUSH_PERIOD_IN_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.memtable_flush_period_in_ms = iprot.readI32();
struct.setMemtable_flush_period_in_msIsSet(true);
@ -3560,7 +3645,7 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 39: // DEFAULT_TIME_TO_LIVE
case 40: // DEFAULT_TIME_TO_LIVE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.default_time_to_live = iprot.readI32();
struct.setDefault_time_to_liveIsSet(true);
@ -3568,7 +3653,7 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 40: // INDEX_INTERVAL
case 41: // INDEX_INTERVAL
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.index_interval = iprot.readI32();
struct.setIndex_intervalIsSet(true);
@ -3576,11 +3661,11 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 41: // SPECULATIVE_RETRY
case 42: // SPECULATIVE_RETRY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.speculative_retry = iprot.readString();
struct.setSpeculative_retryIsSet(true);
} else {
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@ -3888,6 +3973,11 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
oprot.writeDouble(struct.dclocal_read_repair_chance);
oprot.writeFieldEnd();
}
if (struct.isSetPopulate_io_cache_on_flush()) {
oprot.writeFieldBegin(POPULATE_IO_CACHE_ON_FLUSH_FIELD_DESC);
oprot.writeBool(struct.populate_io_cache_on_flush);
oprot.writeFieldEnd();
}
if (struct.isSetMemtable_flush_period_in_ms()) {
oprot.writeFieldBegin(MEMTABLE_FLUSH_PERIOD_IN_MS_FIELD_DESC);
oprot.writeI32(struct.memtable_flush_period_in_ms);
@ -3990,49 +4080,52 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (struct.isSetDclocal_read_repair_chance()) {
optionals.set(19);
}
if (struct.isSetMemtable_flush_period_in_ms()) {
if (struct.isSetPopulate_io_cache_on_flush()) {
optionals.set(20);
}
if (struct.isSetDefault_time_to_live()) {
if (struct.isSetMemtable_flush_period_in_ms()) {
optionals.set(21);
}
if (struct.isSetIndex_interval()) {
if (struct.isSetDefault_time_to_live()) {
optionals.set(22);
}
if (struct.isSetSpeculative_retry()) {
if (struct.isSetIndex_interval()) {
optionals.set(23);
}
if (struct.isSetRow_cache_size()) {
if (struct.isSetSpeculative_retry()) {
optionals.set(24);
}
if (struct.isSetKey_cache_size()) {
if (struct.isSetRow_cache_size()) {
optionals.set(25);
}
if (struct.isSetRow_cache_save_period_in_seconds()) {
if (struct.isSetKey_cache_size()) {
optionals.set(26);
}
if (struct.isSetKey_cache_save_period_in_seconds()) {
if (struct.isSetRow_cache_save_period_in_seconds()) {
optionals.set(27);
}
if (struct.isSetMemtable_flush_after_mins()) {
if (struct.isSetKey_cache_save_period_in_seconds()) {
optionals.set(28);
}
if (struct.isSetMemtable_throughput_in_mb()) {
if (struct.isSetMemtable_flush_after_mins()) {
optionals.set(29);
}
if (struct.isSetMemtable_operations_in_millions()) {
if (struct.isSetMemtable_throughput_in_mb()) {
optionals.set(30);
}
if (struct.isSetMerge_shards_chance()) {
if (struct.isSetMemtable_operations_in_millions()) {
optionals.set(31);
}
if (struct.isSetRow_cache_provider()) {
if (struct.isSetMerge_shards_chance()) {
optionals.set(32);
}
if (struct.isSetRow_cache_keys_to_save()) {
if (struct.isSetRow_cache_provider()) {
optionals.set(33);
}
oprot.writeBitSet(optionals, 34);
if (struct.isSetRow_cache_keys_to_save()) {
optionals.set(34);
}
oprot.writeBitSet(optionals, 35);
if (struct.isSetColumn_type()) {
oprot.writeString(struct.column_type);
}
@ -4113,6 +4206,9 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (struct.isSetDclocal_read_repair_chance()) {
oprot.writeDouble(struct.dclocal_read_repair_chance);
}
if (struct.isSetPopulate_io_cache_on_flush()) {
oprot.writeBool(struct.populate_io_cache_on_flush);
}
if (struct.isSetMemtable_flush_period_in_ms()) {
oprot.writeI32(struct.memtable_flush_period_in_ms);
}
@ -4164,7 +4260,7 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
struct.setKeyspaceIsSet(true);
struct.name = iprot.readString();
struct.setNameIsSet(true);
BitSet incoming = iprot.readBitSet(34);
BitSet incoming = iprot.readBitSet(35);
if (incoming.get(0)) {
struct.column_type = iprot.readString();
struct.setColumn_typeIsSet(true);
@ -4278,58 +4374,62 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
struct.setDclocal_read_repair_chanceIsSet(true);
}
if (incoming.get(20)) {
struct.populate_io_cache_on_flush = iprot.readBool();
struct.setPopulate_io_cache_on_flushIsSet(true);
}
if (incoming.get(21)) {
struct.memtable_flush_period_in_ms = iprot.readI32();
struct.setMemtable_flush_period_in_msIsSet(true);
}
if (incoming.get(21)) {
if (incoming.get(22)) {
struct.default_time_to_live = iprot.readI32();
struct.setDefault_time_to_liveIsSet(true);
}
if (incoming.get(22)) {
if (incoming.get(23)) {
struct.index_interval = iprot.readI32();
struct.setIndex_intervalIsSet(true);
}
if (incoming.get(23)) {
if (incoming.get(24)) {
struct.speculative_retry = iprot.readString();
struct.setSpeculative_retryIsSet(true);
}
if (incoming.get(24)) {
if (incoming.get(25)) {
struct.row_cache_size = iprot.readDouble();
struct.setRow_cache_sizeIsSet(true);
}
if (incoming.get(25)) {
if (incoming.get(26)) {
struct.key_cache_size = iprot.readDouble();
struct.setKey_cache_sizeIsSet(true);
}
if (incoming.get(26)) {
if (incoming.get(27)) {
struct.row_cache_save_period_in_seconds = iprot.readI32();
struct.setRow_cache_save_period_in_secondsIsSet(true);
}
if (incoming.get(27)) {
if (incoming.get(28)) {
struct.key_cache_save_period_in_seconds = iprot.readI32();
struct.setKey_cache_save_period_in_secondsIsSet(true);
}
if (incoming.get(28)) {
if (incoming.get(29)) {
struct.memtable_flush_after_mins = iprot.readI32();
struct.setMemtable_flush_after_minsIsSet(true);
}
if (incoming.get(29)) {
if (incoming.get(30)) {
struct.memtable_throughput_in_mb = iprot.readI32();
struct.setMemtable_throughput_in_mbIsSet(true);
}
if (incoming.get(30)) {
if (incoming.get(31)) {
struct.memtable_operations_in_millions = iprot.readDouble();
struct.setMemtable_operations_in_millionsIsSet(true);
}
if (incoming.get(31)) {
if (incoming.get(32)) {
struct.merge_shards_chance = iprot.readDouble();
struct.setMerge_shards_chanceIsSet(true);
}
if (incoming.get(32)) {
if (incoming.get(33)) {
struct.row_cache_provider = iprot.readString();
struct.setRow_cache_providerIsSet(true);
}
if (incoming.get(33)) {
if (incoming.get(34)) {
struct.row_cache_keys_to_save = iprot.readI32();
struct.setRow_cache_keys_to_saveIsSet(true);
}

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated

View File

@ -65,6 +65,7 @@ class Cql3ParsingRuleSet(CqlParsingRuleSet):
('index_interval', None),
('read_repair_chance', None),
('replicate_on_write', None),
('populate_io_cache_on_flush', None),
)
old_columnfamily_layout_options = (
@ -78,6 +79,7 @@ class Cql3ParsingRuleSet(CqlParsingRuleSet):
('index_interval', None),
('read_repair_chance', None),
('replicate_on_write', None),
('populate_io_cache_on_flush', None),
)
new_columnfamily_layout_options = (
@ -89,6 +91,7 @@ class Cql3ParsingRuleSet(CqlParsingRuleSet):
('index_interval', None),
('read_repair_chance', None),
('replicate_on_write', None),
('populate_io_cache_on_flush', None),
)
old_columnfamily_layout_map_options = (
@ -495,7 +498,7 @@ def cf_new_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 == 'replicate_on_write':
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', 'index_interval'):
@ -631,7 +634,7 @@ def cf_old_prop_val_completer(ctxt, cass):
return simple_cql_types
if this_opt in ('read_repair_chance', 'bloom_filter_fp_chance'):
return [Hint('<float_between_0_and_1>')]
if this_opt == 'replicate_on_write':
if this_opt in ('replicate_on_write', 'populate_io_cache_on_flush'):
return [Hint('<yes_or_no>')]
if this_opt in ('min_compaction_threshold', 'max_compaction_threshold', 'gc_grace_seconds'):
return [Hint('<integer>')]

View File

@ -51,6 +51,7 @@ class CqlParsingRuleSet(pylexotron.ParsingRuleSet):
('replicate_on_write', None),
('compaction_strategy_class', 'compaction_strategy'),
('default_time_to_live', None),
('populate_io_cache_on_flush', None),
)
obsolete_cf_options = (
@ -833,7 +834,7 @@ def create_cf_option_val_completer(ctxt, cass):
return cqltypes.cql_types
if this_opt == 'read_repair_chance':
return [Hint('<float_between_0_and_1>')]
if this_opt == 'replicate_on_write':
if this_opt in ('replicate_on_write', 'populate_io_cache_on_flush'):
return [Hint('<yes_or_no>')]
if this_opt in ('min_compaction_threshold', 'max_compaction_threshold', 'gc_grace_seconds', 'default_time_to_live'):
return [Hint('<integer>')]

View File

@ -142,6 +142,7 @@ public class CliClient
CACHING,
DEFAULT_TIME_TO_LIVE,
SPECULATIVE_RETRY
POPULATE_IO_CACHE_ON_FLUSH
}
private static final String DEFAULT_PLACEMENT_STRATEGY = "org.apache.cassandra.locator.NetworkTopologyStrategy";
@ -1341,6 +1342,8 @@ public class CliClient
break;
case SPECULATIVE_RETRY:
cfDef.setSpeculative_retry(CliUtils.unescapeSQLString(mValue));
case POPULATE_IO_CACHE_ON_FLUSH:
cfDef.setPopulate_io_cache_on_flush(Boolean.parseBoolean(mValue));
break;
default:
//must match one of the above or we'd throw an exception at the valueOf statement above.
@ -1790,6 +1793,7 @@ 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);
@ -2163,6 +2167,7 @@ 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);

View File

@ -83,6 +83,7 @@ public final class CFMetaData
public final static int DEFAULT_DEFAULT_TIME_TO_LIVE = 0;
public final static SpeculativeRetry DEFAULT_SPECULATIVE_RETRY = new SpeculativeRetry(SpeculativeRetry.RetryType.NONE, 0);
public final static int DEFAULT_INDEX_INTERVAL = 128;
public final static boolean DEFAULT_POPULATE_IO_CACHE_ON_FLUSH = false;
// Note that this is the default only for user created tables
public final static String DEFAULT_COMPRESSOR = SnappyCompressor.isAvailable() ? SnappyCompressor.class.getCanonicalName() : null;
@ -116,6 +117,7 @@ public final class CFMetaData
+ "strategy_options text"
+ ") WITH COMPACT STORAGE AND COMMENT='keyspace definitions' AND gc_grace_seconds=8640");
public static final CFMetaData SchemaColumnFamiliesCf = compile(9, "CREATE TABLE " + SystemTable.SCHEMA_COLUMNFAMILIES_CF + "("
<<<<<<< HEAD
+ "keyspace_name text,"
+ "columnfamily_name text,"
+ "id int,"
@ -145,6 +147,7 @@ public final class CFMetaData
+ "default_read_consistency text,"
+ "default_write_consistency text,"
+ "speculative_retry text,"
+ "populate_io_cache_on_flush boolean,"
+ "PRIMARY KEY (keyspace_name, columnfamily_name)"
+ ") WITH COMMENT='ColumnFamily definitions' AND gc_grace_seconds=8640");
public static final CFMetaData SchemaColumnsCf = compile(10, "CREATE TABLE " + SystemTable.SCHEMA_COLUMNS_CF + "("
@ -347,6 +350,7 @@ public final class CFMetaData
private int memtableFlushPeriod = 0;
private volatile int defaultTimeToLive = DEFAULT_DEFAULT_TIME_TO_LIVE;
private volatile SpeculativeRetry speculativeRetry = DEFAULT_SPECULATIVE_RETRY;
private volatile boolean populateIoCacheOnFlush = DEFAULT_POPULATE_IO_CACHE_ON_FLUSH;
volatile Map<ByteBuffer, ColumnDefinition> column_metadata = new HashMap<ByteBuffer,ColumnDefinition>();
public volatile Class<? extends AbstractCompactionStrategy> compactionStrategyClass = DEFAULT_COMPACTION_STRATEGY_CLASS;
@ -381,6 +385,7 @@ public final class CFMetaData
public CFMetaData memtableFlushPeriod(int prop) {memtableFlushPeriod = prop; return this;}
public CFMetaData defaultTimeToLive(int prop) {defaultTimeToLive = prop; return this;}
public CFMetaData speculativeRetry(SpeculativeRetry prop) {speculativeRetry = prop; return this;}
public CFMetaData populateIoCacheOnFlush(boolean prop) {populateIoCacheOnFlush = prop; return this;}
public CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?> comp, AbstractType<?> subcc)
{
@ -531,7 +536,8 @@ public final class CFMetaData
.defaultTimeToLive(oldCFMD.defaultTimeToLive)
.indexInterval(oldCFMD.indexInterval)
.speculativeRetry(oldCFMD.speculativeRetry)
.memtableFlushPeriod(oldCFMD.memtableFlushPeriod);
.memtableFlushPeriod(oldCFMD.memtableFlushPeriod)
.populateIoCacheOnFlush(oldCFMD.populateIoCacheOnFlush);
}
/**
@ -585,6 +591,11 @@ public final class CFMetaData
return replicateOnWrite;
}
public boolean populateIoCacheOnFlush()
{
return populateIoCacheOnFlush;
}
public int getGcGraceSeconds()
{
return gcGraceSeconds;
@ -717,6 +728,7 @@ public final class CFMetaData
.append(defaultTimeToLive, rhs.defaultTimeToLive)
.append(indexInterval, rhs.indexInterval)
.append(speculativeRetry, rhs.speculativeRetry)
.append(populateIoCacheOnFlush, rhs.populateIoCacheOnFlush)
.isEquals();
}
@ -750,6 +762,7 @@ public final class CFMetaData
.append(defaultTimeToLive)
.append(indexInterval)
.append(speculativeRetry)
.append(populateIoCacheOnFlush)
.toHashCode();
}
@ -772,6 +785,8 @@ public final class CFMetaData
cf_def.setComment("");
if (!cf_def.isSetReplicate_on_write())
cf_def.setReplicate_on_write(CFMetaData.DEFAULT_REPLICATE_ON_WRITE);
if (!cf_def.isSetPopulate_io_cache_on_flush())
cf_def.setPopulate_io_cache_on_flush(CFMetaData.DEFAULT_POPULATE_IO_CACHE_ON_FLUSH);
if (!cf_def.isSetMin_compaction_threshold())
cf_def.setMin_compaction_threshold(CFMetaData.DEFAULT_MIN_COMPACTION_THRESHOLD);
if (!cf_def.isSetMax_compaction_threshold())
@ -837,6 +852,8 @@ public final class CFMetaData
newCFMD.indexInterval(cf_def.index_interval);
if (cf_def.isSetSpeculative_retry())
newCFMD.speculativeRetry(SpeculativeRetry.fromString(cf_def.speculative_retry));
if (cf_def.isSetPopulate_io_cache_on_flush())
newCFMD.populateIoCacheOnFlush(cf_def.populate_io_cache_on_flush);
CompressionParameters cp = CompressionParameters.create(cf_def.compression_options);
@ -921,6 +938,7 @@ public final class CFMetaData
caching = cfm.caching;
defaultTimeToLive = cfm.defaultTimeToLive;
speculativeRetry = cfm.speculativeRetry;
populateIoCacheOnFlush = cfm.populateIoCacheOnFlush;
MapDifference<ByteBuffer, ColumnDefinition> columnDiff = Maps.difference(column_metadata, cfm.column_metadata);
// columns that are no longer needed
@ -1053,6 +1071,7 @@ public final class CFMetaData
def.setRead_repair_chance(readRepairChance);
def.setDclocal_read_repair_chance(dcLocalReadRepairChance);
def.setReplicate_on_write(replicateOnWrite);
def.setPopulate_io_cache_on_flush(populateIoCacheOnFlush);
def.setGc_grace_seconds(gcGraceSeconds);
def.setDefault_validation_class(defaultValidator == null ? null : defaultValidator.toString());
def.setKey_validation_class(keyValidator.toString());
@ -1393,6 +1412,7 @@ public final class CFMetaData
cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "read_repair_chance"));
cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "local_read_repair_chance"));
cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "replicate_on_write"));
cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "populate_io_cache_on_flush"));
cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "gc_grace_seconds"));
cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "default_validator"));
cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "key_validator"));
@ -1459,6 +1479,7 @@ public final class CFMetaData
cf.addColumn(Column.create(readRepairChance, timestamp, cfName, "read_repair_chance"));
cf.addColumn(Column.create(dcLocalReadRepairChance, timestamp, cfName, "local_read_repair_chance"));
cf.addColumn(Column.create(replicateOnWrite, timestamp, cfName, "replicate_on_write"));
cf.addColumn(Column.create(populateIoCacheOnFlush, timestamp, cfName, "populate_io_cache_on_flush"));
cf.addColumn(Column.create(gcGraceSeconds, timestamp, cfName, "gc_grace_seconds"));
cf.addColumn(Column.create(defaultValidator.toString(), timestamp, cfName, "default_validator"));
cf.addColumn(Column.create(keyValidator.toString(), timestamp, cfName, "key_validator"));
@ -1530,7 +1551,8 @@ public final class CFMetaData
cfm.compactionStrategyOptions(fromJsonMap(result.getString("compaction_strategy_options")));
if (result.has("index_interval"))
cfm.indexInterval(result.getInt("index_interval"));
if (result.has("populate_io_cache_on_flush"))
cfm.populateIoCacheOnFlush(result.getBoolean("populate_io_cache_on_flush"));
return cfm;
}
catch (SyntaxException e)
@ -1696,6 +1718,7 @@ public final class CFMetaData
.append("defaultTimeToLive", defaultTimeToLive)
.append("speculative_retry", speculativeRetry)
.append("indexInterval", indexInterval)
.append("populateIoCacheOnFlush", populateIoCacheOnFlush)
.toString();
}
}

View File

@ -205,8 +205,6 @@ public class DatabaseDescriptor
logger.info("disk_failure_policy is " + conf.disk_failure_policy);
logger.debug("page_cache_hinting is " + conf.populate_io_cache_on_flush);
/* Authentication and authorization backend, implementing IAuthenticator and IAuthorizer */
if (conf.authenticator != null)
authenticator = FBUtilities.construct(conf.authenticator, "authenticator");
@ -1259,11 +1257,6 @@ public class DatabaseDescriptor
return conf.streaming_socket_timeout_in_ms;
}
public static boolean populateIOCacheOnFlush()
{
return conf.populate_io_cache_on_flush;
}
public static String getLocalDataCenter()
{
return localDC;

View File

@ -188,6 +188,7 @@ public class AlterTableStatement
cfm.caching(CFMetaData.Caching.fromString(cfProps.getPropertyString(CFPropDefs.KW_CACHING, cfm.getCaching().toString())));
cfm.defaultTimeToLive(cfProps.getPropertyInt(CFPropDefs.KW_DEFAULT_TIME_TO_LIVE, cfm.getDefaultTimeToLive()));
cfm.speculativeRetry(CFMetaData.SpeculativeRetry.fromString(cfProps.getPropertyString(CFPropDefs.KW_SPECULATIVE_RETRY, cfm.getSpeculativeRetry().toString())));
cfm.populateIoCacheOnFlush(cfProps.getPropertyBoolean(CFPropDefs.KW_POPULATE_IO_CACHE_ON_FLUSH, cfm.populateIoCacheOnFlush()));
cfm.bloomFilterFpChance(cfProps.getPropertyDouble(CFPropDefs.KW_BF_FP_CHANCE, cfm.getBloomFilterFpChance()));
cfm.memtableFlushPeriod(cfProps.getPropertyInt(CFPropDefs.KW_MEMTABLE_FLUSH_PERIOD, cfm.getMemtableFlushPeriod()));

View File

@ -50,6 +50,7 @@ public class CFPropDefs {
public static final String KW_CACHING = "caching";
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";
@ -92,6 +93,7 @@ public class CFPropDefs {
keywords.add(KW_CACHING);
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);

View File

@ -197,7 +197,8 @@ public class CreateColumnFamilyStatement
.speculativeRetry(CFMetaData.SpeculativeRetry.fromString(getPropertyString(CFPropDefs.KW_SPECULATIVE_RETRY, CFMetaData.DEFAULT_SPECULATIVE_RETRY.toString())))
.bloomFilterFpChance(getPropertyDouble(CFPropDefs.KW_BF_FP_CHANCE, null))
.memtableFlushPeriod(getPropertyInt(CFPropDefs.KW_MEMTABLE_FLUSH_PERIOD, 0))
.defaultTimeToLive(getPropertyInt(CFPropDefs.KW_DEFAULT_TIME_TO_LIVE, CFMetaData.DEFAULT_DEFAULT_TIME_TO_LIVE));
.defaultTimeToLive(getPropertyInt(CFPropDefs.KW_DEFAULT_TIME_TO_LIVE, CFMetaData.DEFAULT_DEFAULT_TIME_TO_LIVE))
.populateIoCacheOnFlush(getPropertyBoolean(CFPropDefs.KW_POPULATE_IO_CACHE_ON_FLUSH, CFMetaData.DEFAULT_POPULATE_IO_CACHE_ON_FLUSH));
// CQL2 can have null keyAliases
if (keyAlias != null)

View File

@ -42,6 +42,7 @@ public class CFPropDefs extends PropertyDefinitions
public static final String KW_CACHING = "caching";
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";
@ -63,6 +64,7 @@ public class CFPropDefs extends PropertyDefinitions
keywords.add(KW_CACHING);
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_COMPACTION);
keywords.add(KW_COMPRESSION);
@ -143,6 +145,7 @@ public class CFPropDefs extends PropertyDefinitions
cfm.defaultTimeToLive(getInt(KW_DEFAULT_TIME_TO_LIVE, cfm.getDefaultTimeToLive()));
cfm.speculativeRetry(CFMetaData.SpeculativeRetry.fromString(getString(KW_SPECULATIVE_RETRY, cfm.getSpeculativeRetry().toString())));
cfm.memtableFlushPeriod(getInt(KW_MEMTABLE_FLUSH_PERIOD, cfm.getMemtableFlushPeriod()));
cfm.populateIoCacheOnFlush(getBoolean(KW_POPULATE_IO_CACHE_ON_FLUSH, cfm.populateIoCacheOnFlush()));
if (compactionStrategyClass != null)
{

View File

@ -99,7 +99,7 @@ public class SSTableWriter extends SSTable
dbuilder = SegmentedFile.getCompressedBuilder();
dataFile = CompressedSequentialWriter.open(getFilename(),
descriptor.filenameFor(Component.COMPRESSION_INFO),
!DatabaseDescriptor.populateIOCacheOnFlush(),
!metadata.populateIoCacheOnFlush(),
metadata.compressionParameters(),
sstableMetadataCollector);
}
@ -107,7 +107,7 @@ public class SSTableWriter extends SSTable
{
dbuilder = SegmentedFile.getBuilder(DatabaseDescriptor.getDiskAccessMode());
dataFile = SequentialWriter.open(new File(getFilename()),
!DatabaseDescriptor.populateIOCacheOnFlush());
!metadata.populateIoCacheOnFlush());
integratyWriter = DataIntegrityMetadata.checksumWriter(descriptor);
dataFile.setDataIntegratyWriter(integratyWriter);
}
@ -406,7 +406,7 @@ public class SSTableWriter extends SSTable
IndexWriter(long keyCount)
{
indexFile = SequentialWriter.open(new File(descriptor.filenameFor(SSTable.COMPONENT_INDEX)),
!DatabaseDescriptor.populateIOCacheOnFlush());
!metadata.populateIoCacheOnFlush());
builder = SegmentedFile.getBuilder(DatabaseDescriptor.getIndexAccessMode());
summary = new IndexSummary(keyCount, metadata.getIndexInterval());
bf = FilterFactory.getFilter(keyCount, metadata.getBloomFilterFpChance(), true);

View File

@ -544,6 +544,9 @@ commands:
- 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:
@ -834,6 +837,9 @@ commands:
- 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: