You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2014/12/22 15:00:42 UTC
cassandra git commit: Cassandra stress user defined writes should
populate sequentially
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1 9775a9c68 -> 29ff2d26f
Cassandra stress user defined writes should populate sequentially
Patch by tjake; reviewed by Benedict for CASSANDRA-8524
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/29ff2d26
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/29ff2d26
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/29ff2d26
Branch: refs/heads/cassandra-2.1
Commit: 29ff2d26f87f5977aa919d037ca3bbb67e40bdb0
Parents: 9775a9c
Author: T Jake Luciani <ja...@apache.org>
Authored: Mon Dec 22 08:59:12 2014 -0500
Committer: T Jake Luciani <ja...@apache.org>
Committed: Mon Dec 22 08:59:12 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/stress/settings/SettingsCommandUser.java | 5 +++++
.../apache/cassandra/stress/settings/SettingsPopulation.java | 5 +++++
3 files changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/29ff2d26/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f7b47e8..64bdb62 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/29ff2d26/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommandUser.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommandUser.java b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommandUser.java
index 9841433..d5b221c 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommandUser.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommandUser.java
@@ -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);
http://git-wip-us.apache.org/repos/asf/cassandra/blob/29ff2d26/tools/stress/src/org/apache/cassandra/stress/settings/SettingsPopulation.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsPopulation.java b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsPopulation.java
index da4c282..e57faea 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsPopulation.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsPopulation.java
@@ -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)
{