You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bl...@apache.org on 2015/12/03 21:27:38 UTC

cassandra git commit: Fix stress profile parsing on Windows

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 b85da7196 -> b87642422


Fix stress profile parsing on Windows

patch by Benjamin Lerer; reviewed by Joshua McKenzie for CASSANDRA-10808


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b8764242
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b8764242
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b8764242

Branch: refs/heads/cassandra-2.1
Commit: b876424228d320fdda5e9c53fc7b966f4400ffb3
Parents: b85da71
Author: Benjamin Lerer <b....@gmail.com>
Authored: Thu Dec 3 21:25:42 2015 +0100
Committer: Benjamin Lerer <b....@gmail.com>
Committed: Thu Dec 3 21:25:42 2015 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                   | 4 ++++
 .../apache/cassandra/stress/settings/SettingsCommandUser.java | 7 +------
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8764242/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9c5e2d5..1a2887a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.1.13
+ * Fix Stress profile parsing on Windows (CASSANDRA-10808)
+
+
 2.1.12
  * Fix incremental repair hang when replica is down (CASSANDRA-10288)
  * Avoid writing range tombstones after END_OF_ROW marker (CASSANDRA-10791)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8764242/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 5228828..8440e8e 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommandUser.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsCommandUser.java
@@ -55,12 +55,7 @@ public class SettingsCommandUser extends SettingsCommand
 
         String yamlPath = options.profile.value();
         File yamlFile = new File(yamlPath);
-        if (yamlFile.exists())
-        {
-            yamlPath = "file:///" + yamlFile.getAbsolutePath();
-        }
-
-        profile = StressProfile.load(URI.create(yamlPath));
+        profile = StressProfile.load(yamlFile.exists() ? yamlFile.toURI() : URI.create(yamlPath));
 
         if (ratios.size() == 0)
             throw new IllegalArgumentException("Must specify at least one command with a non-zero ratio");