Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 b1b9cba2a -> 93f679e00
Add missing consistency levels to cassandra-stress Patch by Liang Xie; Reviewed by tjake for CASSANDRA-8253 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/93f679e0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/93f679e0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/93f679e0 Branch: refs/heads/cassandra-2.1 Commit: 93f679e00f0dbd81972acf641c5a47f3ee4727ee Parents: b1b9cba Author: T Jake Luciani <j...@apache.org> Authored: Tue Dec 16 15:24:40 2014 -0500 Committer: T Jake Luciani <j...@apache.org> Committed: Tue Dec 16 15:24:40 2014 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/stress/settings/SettingsCommand.java | 2 +- .../src/org/apache/cassandra/stress/util/JavaDriverClient.java | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/93f679e0/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 964de54..6c0f2da 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.3 + * Add missing ConsistencyLevels to cassandra-stress (CASSANDRA-8253) * Add auth support to cassandra-stress (CASSANDRA-7985) * Fix ArrayIndexOutOfBoundsException when generating error message for some CQL syntax errors (CASSANDRA-8455) http://git-wip-us.apache.org/repos/asf/cassandra/blob/93f679e0/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommand.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommand.java b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommand.java index 8751dbf..e8b45ec 100644 --- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommand.java +++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommand.java @@ -107,7 +107,7 @@ public abstract class SettingsCommand implements Serializable static abstract class Options extends GroupedOptions { final OptionSimple noWarmup = new OptionSimple("no-warmup", "", null, "Do not warmup the process", false); - final OptionSimple consistencyLevel = new OptionSimple("cl=", "ONE|QUORUM|LOCAL_QUORUM|EACH_QUORUM|ALL|ANY", "ONE", "Consistency level to use", false); + final OptionSimple consistencyLevel = new OptionSimple("cl=", "ONE|QUORUM|LOCAL_QUORUM|EACH_QUORUM|ALL|ANY|TWO|THREE|SERIAL|LOCAL_SERIAL|LOCAL_ONE", "ONE", "Consistency level to use", false); } static class Count extends Options http://git-wip-us.apache.org/repos/asf/cassandra/blob/93f679e0/tools/stress/src/org/apache/cassandra/stress/util/JavaDriverClient.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/util/JavaDriverClient.java b/tools/stress/src/org/apache/cassandra/stress/util/JavaDriverClient.java index 7aa7257..43d9ddc 100644 --- a/tools/stress/src/org/apache/cassandra/stress/util/JavaDriverClient.java +++ b/tools/stress/src/org/apache/cassandra/stress/util/JavaDriverClient.java @@ -178,6 +178,12 @@ public class JavaDriverClient return com.datastax.driver.core.ConsistencyLevel.LOCAL_QUORUM; case EACH_QUORUM: return com.datastax.driver.core.ConsistencyLevel.EACH_QUORUM; + case SERIAL: + return com.datastax.driver.core.ConsistencyLevel.SERIAL; + case LOCAL_SERIAL: + return com.datastax.driver.core.ConsistencyLevel.LOCAL_SERIAL; + case LOCAL_ONE: + return com.datastax.driver.core.ConsistencyLevel.LOCAL_ONE; } throw new AssertionError(); }