Author: gdusbabek
Date: Tue Jan 18 18:07:51 2011
New Revision: 1060497
URL: http://svn.apache.org/viewvc?rev=1060497&view=rev
Log:
fix order of replicate_on_write and make sure it's not null. patch by
gdusbabek, reviewed by eevans. CASSANDRA-2001
Modified:
cassandra/trunk/src/avro/internode.genavro
cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
Modified: cassandra/trunk/src/avro/internode.genavro
URL:
http://svn.apache.org/viewvc/cassandra/trunk/src/avro/internode.genavro?rev=1060497&r1=1060496&r2=1060497&view=diff
==============================================================================
--- cassandra/trunk/src/avro/internode.genavro (original)
+++ cassandra/trunk/src/avro/internode.genavro Tue Jan 18 18:07:51 2011
@@ -40,6 +40,7 @@ protocol InterNode {
@aliases(["org.apache.cassandra.config.avro.CfDef"])
@namespace("org.apache.cassandra.avro")
record CfDef {
+ /* order is important. */
string keyspace;
string name;
union { string, null } column_type;
@@ -49,7 +50,6 @@ protocol InterNode {
union { double, null } row_cache_size;
union { double, null } key_cache_size;
union { double, null } read_repair_chance;
- union { boolean, null } replicate_on_write;
union { int, null } gc_grace_seconds;
union { null, string } default_validation_class = null;
union { null, int } min_compaction_threshold = null;
@@ -61,6 +61,7 @@ protocol InterNode {
union { null, double} memtable_operations_in_millions = null;
union { int, null } id;
union { array<ColumnDef>, null } column_metadata;
+ union { boolean, null } replicate_on_write;
}
@aliases(["org.apache.cassandra.config.avro.KsDef"])
Modified: cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
URL:
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1060497&r1=1060496&r2=1060497&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java Tue
Jan 18 18:07:51 2011
@@ -427,6 +427,7 @@ public final class CFMetaData
Integer memtable_flush_after_mins = cf.memtable_flush_after_mins ==
null ? DEFAULT_MEMTABLE_LIFETIME_IN_MINS : cf.memtable_flush_after_mins;
Integer memtable_throughput_in_mb = cf.memtable_throughput_in_mb ==
null ? DEFAULT_MEMTABLE_THROUGHPUT_IN_MB : cf.memtable_throughput_in_mb;
Double memtable_operations_in_millions =
cf.memtable_operations_in_millions == null ?
DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS : cf.memtable_operations_in_millions;
+ Boolean replicate_on_write = cf.replicate_on_write == null ?
Boolean.FALSE : cf.replicate_on_write;
return new CFMetaData(cf.keyspace.toString(),
cf.name.toString(),
@@ -437,7 +438,7 @@ public final class CFMetaData
cf.row_cache_size,
cf.key_cache_size,
cf.read_repair_chance,
- cf.replicate_on_write,
+ replicate_on_write,
cf.gc_grace_seconds,
validator,
minct,