cassandra-stress: fix support for NetworkTopologyStrategy patch by benedict; reviewed by yukim for CASSANDRA-7945
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/109313c3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/109313c3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/109313c3 Branch: refs/heads/trunk Commit: 109313c3ed3f7b2d8a79318e532e5f90a1e26414 Parents: b319b40 Author: Benedict Elliott Smith <[email protected]> Authored: Tue Sep 16 20:48:29 2014 +0100 Committer: Benedict Elliott Smith <[email protected]> Committed: Tue Sep 16 20:48:29 2014 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/stress/settings/OptionReplication.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/109313c3/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index f89cc6d..1764a20 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945) * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) http://git-wip-us.apache.org/repos/asf/cassandra/blob/109313c3/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java b/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java index 06ec9b8..8b65587 100644 --- a/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java +++ b/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java @@ -51,7 +51,8 @@ class OptionReplication extends OptionMulti public Map<String, String> getOptions() { Map<String, String> options = extraOptions(); - options.put("replication_factor", factor.value()); + if (!options.containsKey("replication_factor") && (strategy.value().equals("org.apache.cassandra.locator.SimpleStrategy") || factor.setByUser())) + options.put("replication_factor", factor.value()); return options; }
