You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2014/09/16 21:49:19 UTC

[2/3] git commit: cassandra-stress: fix support for NetworkTopologyStrategy

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 <be...@apache.org>
Authored: Tue Sep 16 20:48:29 2014 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
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;
     }