Cassandra stress user defined writes should populate sequentially

Patch by tjake; reviewed by Benedict for CASSANDRA-8524
This commit is contained in:
T Jake Luciani 2014-12-22 08:59:12 -05:00
parent 9775a9c680
commit 29ff2d26f8
3 changed files with 11 additions and 0 deletions

View File

@ -1,4 +1,5 @@
2.1.3
* Stress - user defined writes should populate sequentally (CASSANDRA-8524)
* Fix regression in SSTableRewriter causing some rows to become unreadable
during compaction (CASSANDRA-8429)
* Run major compactions for repaired/unrepaired in parallel (CASSANDRA-8510)

View File

@ -65,6 +65,11 @@ public class SettingsCommandUser extends SettingsCommand
throw new IllegalArgumentException("Must specify at least one command with a non-zero ratio");
}
public boolean hasInsertOnly()
{
return ratios.size() == 1 && ratios.containsKey("insert");
}
public OpDistributionFactory getFactory(final StressSettings settings)
{
final SeedManager seeds = new SeedManager(settings);

View File

@ -134,6 +134,11 @@ public class SettingsPopulation implements Serializable
String[] params = clArgs.remove("-pop");
if (params == null)
{
if (command instanceof SettingsCommandUser && ((SettingsCommandUser)command).hasInsertOnly())
{
return new SettingsPopulation(new SequentialOptions(defaultLimit));
}
// return defaults:
switch(command.type)
{