Add missing consistency levels to cassandra-stress

Patch by Liang Xie; Reviewed by tjake for CASSANDRA-8253
This commit is contained in:
T Jake Luciani 2014-12-16 15:24:40 -05:00
parent b1b9cba2a5
commit 93f679e00f
3 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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

View File

@ -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();
}