Author: goffinet Date: Thu Feb 24 18:10:05 2011 New Revision: 1074245 URL: http://svn.apache.org/viewvc?rev=1074245&view=rev Log: Cli does not support updating replicate_on_write. patch Kelvin Kakugawa; reviewed by Pavel Yaskevich for CASSANDRA-2236
Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java?rev=1074245&r1=1074244&r2=1074245&view=diff ============================================================================== --- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original) +++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Thu Feb 24 18:10:05 2011 @@ -939,6 +939,9 @@ public class CliClient extends CliUserHe case MAX_COMPACTION_THRESHOLD: cfDef.setMax_compaction_threshold(Integer.parseInt(mValue)); break; + case REPLICATE_ON_WRITE: + cfDef.setReplicate_on_write(Boolean.parseBoolean(mValue)); + break; default: //must match one of the above or we'd throw an exception at the valueOf statement above. assert(false); @@ -1324,6 +1327,7 @@ public class CliClient extends CliUserHe sessionState.out.printf(" GC grace seconds: %s%n", cf_def.gc_grace_seconds); 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(" Replicate on write: %s%n", cf_def.replicate_on_write); // if we have connection to the cfMBean established if (cfMBean != null) Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java?rev=1074245&r1=1074244&r2=1074245&view=diff ============================================================================== --- cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java (original) +++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java Thu Feb 24 18:10:05 2011 @@ -49,6 +49,7 @@ public class CliUserHelp { DEFAULT_VALIDATION_CLASS, MIN_COMPACTION_THRESHOLD, MAX_COMPACTION_THRESHOLD, + REPLICATE_ON_WRITE, } protected EnumMap<ColumnFamilyArgument, String> argumentExplanations = new EnumMap<ColumnFamilyArgument, String>(ColumnFamilyArgument.class) @@ -68,6 +69,7 @@ public class CliUserHelp { put(ColumnFamilyArgument.GC_GRACE, "Discard tombstones after this many seconds"); put(ColumnFamilyArgument.MIN_COMPACTION_THRESHOLD, "Avoid minor compactions of less than this number of sstable files"); put(ColumnFamilyArgument.MAX_COMPACTION_THRESHOLD, "Compact no more than this number of sstable files at once"); + put(ColumnFamilyArgument.REPLICATE_ON_WRITE, "Replicate every counter update from the leader to the follower replicas"); }}; protected void printCmdHelp(Tree statement, CliSessionState state)