From b876424228d320fdda5e9c53fc7b966f4400ffb3 Mon Sep 17 00:00:00 2001 From: Benjamin Lerer Date: Thu, 3 Dec 2015 21:25:42 +0100 Subject: [PATCH] Fix stress profile parsing on Windows patch by Benjamin Lerer; reviewed by Joshua McKenzie for CASSANDRA-10808 --- CHANGES.txt | 4 ++++ .../cassandra/stress/settings/SettingsCommandUser.java | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9c5e2d5c55..1a2887a796 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) 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 5228828015..8440e8e288 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");