mirror of https://github.com/apache/cassandra
reincarnate removed and deprecated KsDef/CfDef attributes
patch by Paul Cannon; reviewed by Pavel Yaskevich for CASSANDRA-3953
This commit is contained in:
parent
c44a19a809
commit
930721d71a
|
|
@ -13,6 +13,7 @@
|
|||
* fix for intermittent SchemaDisagreementException (CASSANDRA-3884)
|
||||
* ignore deprecated KsDef/CfDef/ColumnDef fields in native schema (CASSANDRA-3963)
|
||||
* CLI to report when unsupported column_metadata pair was given (CASSANDRA-3959)
|
||||
* reincarnate removed and deprecated KsDef/CfDef attributes (CASSANDRA-3953)
|
||||
Merged from 1.0:
|
||||
* remove the wait on hint future during write (CASSANDRA-3870)
|
||||
* (cqlsh) ignore missing CfDef opts (CASSANDRA-3933)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace rb CassandraThrift
|
|||
# for every edit that doesn't result in a change to major/minor.
|
||||
#
|
||||
# See the Semantic Versioning Specification (SemVer) http://semver.org.
|
||||
const string VERSION = "19.28.0"
|
||||
const string VERSION = "19.29.0"
|
||||
|
||||
|
||||
#
|
||||
|
|
@ -417,6 +417,29 @@ struct CfDef {
|
|||
35: optional list<binary> column_aliases,
|
||||
36: optional binary value_alias,
|
||||
37: optional double dclocal_read_repair_chance = 0.0,
|
||||
|
||||
/* All of the following are now ignored and unsupplied. */
|
||||
|
||||
/** @deprecated */
|
||||
9: optional double row_cache_size,
|
||||
/** @deprecated */
|
||||
11: optional double key_cache_size,
|
||||
/** @deprecated */
|
||||
19: optional i32 row_cache_save_period_in_seconds,
|
||||
/** @deprecated */
|
||||
20: optional i32 key_cache_save_period_in_seconds,
|
||||
/** @deprecated */
|
||||
21: optional i32 memtable_flush_after_mins,
|
||||
/** @deprecated */
|
||||
22: optional i32 memtable_throughput_in_mb,
|
||||
/** @deprecated */
|
||||
23: optional double memtable_operations_in_millions,
|
||||
/** @deprecated */
|
||||
25: optional double merge_shards_chance,
|
||||
/** @deprecated */
|
||||
27: optional string row_cache_provider,
|
||||
/** @deprecated */
|
||||
31: optional i32 row_cache_keys_to_save,
|
||||
}
|
||||
|
||||
/* describes a keyspace. */
|
||||
|
|
@ -425,6 +448,9 @@ struct KsDef {
|
|||
2: required string strategy_class,
|
||||
3: optional map<string,string> strategy_options,
|
||||
|
||||
/** @deprecated, ignored */
|
||||
4: optional i32 replication_factor,
|
||||
|
||||
5: required list<CfDef> cf_defs,
|
||||
6: optional bool durable_writes=1,
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -44,6 +44,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
public class Constants {
|
||||
|
||||
public static final String VERSION = "19.28.0";
|
||||
public static final String VERSION = "19.29.0";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,12 +48,17 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField STRATEGY_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("strategy_class", org.apache.thrift.protocol.TType.STRING, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField STRATEGY_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("strategy_options", org.apache.thrift.protocol.TType.MAP, (short)3);
|
||||
private static final org.apache.thrift.protocol.TField REPLICATION_FACTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("replication_factor", org.apache.thrift.protocol.TType.I32, (short)4);
|
||||
private static final org.apache.thrift.protocol.TField CF_DEFS_FIELD_DESC = new org.apache.thrift.protocol.TField("cf_defs", org.apache.thrift.protocol.TType.LIST, (short)5);
|
||||
private static final org.apache.thrift.protocol.TField DURABLE_WRITES_FIELD_DESC = new org.apache.thrift.protocol.TField("durable_writes", org.apache.thrift.protocol.TType.BOOL, (short)6);
|
||||
|
||||
public String name; // required
|
||||
public String strategy_class; // required
|
||||
public Map<String,String> strategy_options; // required
|
||||
/**
|
||||
* @deprecated, ignored
|
||||
*/
|
||||
public int replication_factor; // required
|
||||
public List<CfDef> cf_defs; // required
|
||||
public boolean durable_writes; // required
|
||||
|
||||
|
|
@ -62,6 +67,10 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
NAME((short)1, "name"),
|
||||
STRATEGY_CLASS((short)2, "strategy_class"),
|
||||
STRATEGY_OPTIONS((short)3, "strategy_options"),
|
||||
/**
|
||||
* @deprecated, ignored
|
||||
*/
|
||||
REPLICATION_FACTOR((short)4, "replication_factor"),
|
||||
CF_DEFS((short)5, "cf_defs"),
|
||||
DURABLE_WRITES((short)6, "durable_writes");
|
||||
|
||||
|
|
@ -84,6 +93,8 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
return STRATEGY_CLASS;
|
||||
case 3: // STRATEGY_OPTIONS
|
||||
return STRATEGY_OPTIONS;
|
||||
case 4: // REPLICATION_FACTOR
|
||||
return REPLICATION_FACTOR;
|
||||
case 5: // CF_DEFS
|
||||
return CF_DEFS;
|
||||
case 6: // DURABLE_WRITES
|
||||
|
|
@ -128,8 +139,9 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
private static final int __DURABLE_WRITES_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
private static final int __REPLICATION_FACTOR_ISSET_ID = 0;
|
||||
private static final int __DURABLE_WRITES_ISSET_ID = 1;
|
||||
private BitSet __isset_bit_vector = new BitSet(2);
|
||||
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
|
|
@ -142,6 +154,8 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
|
||||
tmpMap.put(_Fields.REPLICATION_FACTOR, new org.apache.thrift.meta_data.FieldMetaData("replication_factor", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.CF_DEFS, new org.apache.thrift.meta_data.FieldMetaData("cf_defs", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
||||
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
||||
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CfDef.class))));
|
||||
|
|
@ -194,6 +208,7 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
}
|
||||
this.strategy_options = __this__strategy_options;
|
||||
}
|
||||
this.replication_factor = other.replication_factor;
|
||||
if (other.isSetCf_defs()) {
|
||||
List<CfDef> __this__cf_defs = new ArrayList<CfDef>();
|
||||
for (CfDef other_element : other.cf_defs) {
|
||||
|
|
@ -213,6 +228,8 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
this.name = null;
|
||||
this.strategy_class = null;
|
||||
this.strategy_options = null;
|
||||
setReplication_factorIsSet(false);
|
||||
this.replication_factor = 0;
|
||||
this.cf_defs = null;
|
||||
this.durable_writes = true;
|
||||
|
||||
|
|
@ -301,6 +318,35 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, ignored
|
||||
*/
|
||||
public int getReplication_factor() {
|
||||
return this.replication_factor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, ignored
|
||||
*/
|
||||
public KsDef setReplication_factor(int replication_factor) {
|
||||
this.replication_factor = replication_factor;
|
||||
setReplication_factorIsSet(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetReplication_factor() {
|
||||
__isset_bit_vector.clear(__REPLICATION_FACTOR_ISSET_ID);
|
||||
}
|
||||
|
||||
/** Returns true if field replication_factor is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetReplication_factor() {
|
||||
return __isset_bit_vector.get(__REPLICATION_FACTOR_ISSET_ID);
|
||||
}
|
||||
|
||||
public void setReplication_factorIsSet(boolean value) {
|
||||
__isset_bit_vector.set(__REPLICATION_FACTOR_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public int getCf_defsSize() {
|
||||
return (this.cf_defs == null) ? 0 : this.cf_defs.size();
|
||||
}
|
||||
|
|
@ -389,6 +435,14 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
}
|
||||
break;
|
||||
|
||||
case REPLICATION_FACTOR:
|
||||
if (value == null) {
|
||||
unsetReplication_factor();
|
||||
} else {
|
||||
setReplication_factor((Integer)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case CF_DEFS:
|
||||
if (value == null) {
|
||||
unsetCf_defs();
|
||||
|
|
@ -419,6 +473,9 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
case STRATEGY_OPTIONS:
|
||||
return getStrategy_options();
|
||||
|
||||
case REPLICATION_FACTOR:
|
||||
return Integer.valueOf(getReplication_factor());
|
||||
|
||||
case CF_DEFS:
|
||||
return getCf_defs();
|
||||
|
||||
|
|
@ -442,6 +499,8 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
return isSetStrategy_class();
|
||||
case STRATEGY_OPTIONS:
|
||||
return isSetStrategy_options();
|
||||
case REPLICATION_FACTOR:
|
||||
return isSetReplication_factor();
|
||||
case CF_DEFS:
|
||||
return isSetCf_defs();
|
||||
case DURABLE_WRITES:
|
||||
|
|
@ -490,6 +549,15 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_replication_factor = true && this.isSetReplication_factor();
|
||||
boolean that_present_replication_factor = true && that.isSetReplication_factor();
|
||||
if (this_present_replication_factor || that_present_replication_factor) {
|
||||
if (!(this_present_replication_factor && that_present_replication_factor))
|
||||
return false;
|
||||
if (this.replication_factor != that.replication_factor)
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_cf_defs = true && this.isSetCf_defs();
|
||||
boolean that_present_cf_defs = true && that.isSetCf_defs();
|
||||
if (this_present_cf_defs || that_present_cf_defs) {
|
||||
|
|
@ -530,6 +598,11 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
if (present_strategy_options)
|
||||
builder.append(strategy_options);
|
||||
|
||||
boolean present_replication_factor = true && (isSetReplication_factor());
|
||||
builder.append(present_replication_factor);
|
||||
if (present_replication_factor)
|
||||
builder.append(replication_factor);
|
||||
|
||||
boolean present_cf_defs = true && (isSetCf_defs());
|
||||
builder.append(present_cf_defs);
|
||||
if (present_cf_defs)
|
||||
|
|
@ -581,6 +654,16 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetReplication_factor()).compareTo(typedOther.isSetReplication_factor());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetReplication_factor()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replication_factor, typedOther.replication_factor);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetCf_defs()).compareTo(typedOther.isSetCf_defs());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
|
|
@ -651,6 +734,14 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // REPLICATION_FACTOR
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.replication_factor = iprot.readI32();
|
||||
setReplication_factorIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 5: // CF_DEFS
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
|
|
@ -717,6 +808,11 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetReplication_factor()) {
|
||||
oprot.writeFieldBegin(REPLICATION_FACTOR_FIELD_DESC);
|
||||
oprot.writeI32(this.replication_factor);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.cf_defs != null) {
|
||||
oprot.writeFieldBegin(CF_DEFS_FIELD_DESC);
|
||||
{
|
||||
|
|
@ -768,6 +864,12 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
}
|
||||
first = false;
|
||||
}
|
||||
if (isSetReplication_factor()) {
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("replication_factor:");
|
||||
sb.append(this.replication_factor);
|
||||
first = false;
|
||||
}
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("cf_defs:");
|
||||
if (this.cf_defs == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue