From f63d1255d16ecba1a5fb8839fc93be61a9212d93 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 23 May 2016 14:47:22 -0400 Subject: [PATCH] Cleanup settings and system properties entanglement This commit cleans up some additional places where system properties were being used to pass settings to Elasticsearch. Relates #18524 --- dev-tools/create_bwc_index.py | 14 +++++++------- .../java/org/elasticsearch/test/ExternalNode.java | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dev-tools/create_bwc_index.py b/dev-tools/create_bwc_index.py index 361934908ec..f73bc58554b 100644 --- a/dev-tools/create_bwc_index.py +++ b/dev-tools/create_bwc_index.py @@ -137,13 +137,13 @@ def start_node(version, release_dir, data_dir, repo_dir, tcp_port=DEFAULT_TRANSP cmd = [ os.path.join(release_dir, 'bin/elasticsearch'), - '-Des.path.data=%s' % data_dir, - '-Des.path.logs=logs', - '-Des.cluster.name=%s' % cluster_name, - '-Des.network.host=localhost', - '-Des.transport.tcp.port=%s' % tcp_port, - '-Des.http.port=%s' % http_port, - '-Des.path.repo=%s' % repo_dir + '-Epath.data=%s' % data_dir, + '-Epath.logs=logs', + '-Ecluster.name=%s' % cluster_name, + '-Enetwork.host=localhost', + '-Etransport.tcp.port=%s' % tcp_port, + '-Ehttp.port=%s' % http_port, + '-Epath.repo=%s' % repo_dir ] if version.startswith('0.') or version.startswith('1.0.0.Beta') : cmd.append('-f') # version before 1.0 start in background automatically diff --git a/test/framework/src/main/java/org/elasticsearch/test/ExternalNode.java b/test/framework/src/main/java/org/elasticsearch/test/ExternalNode.java index efdd6bad90f..c08c2793eaa 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ExternalNode.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ExternalNode.java @@ -99,8 +99,8 @@ final class ExternalNode implements Closeable { } else { params.add("bin/elasticsearch.bat"); } - params.add("-Des.cluster.name=" + clusterName); - params.add("-Des.node.name=" + nodeName); + params.add("-Ecluster.name=" + clusterName); + params.add("-Enode.name=" + nodeName); Settings.Builder externaNodeSettingsBuilder = Settings.builder(); for (Map.Entry entry : settings.getAsMap().entrySet()) { switch (entry.getKey()) { @@ -121,11 +121,11 @@ final class ExternalNode implements Closeable { } this.externalNodeSettings = externaNodeSettingsBuilder.put(REQUIRED_SETTINGS).build(); for (Map.Entry entry : externalNodeSettings.getAsMap().entrySet()) { - params.add("-Des." + entry.getKey() + "=" + entry.getValue()); + params.add("-E" + entry.getKey() + "=" + entry.getValue()); } - params.add("-Des.path.home=" + PathUtils.get(".").toAbsolutePath()); - params.add("-Des.path.conf=" + path + "/config"); + params.add("-Epath.home=" + PathUtils.get(".").toAbsolutePath()); + params.add("-Epath.conf=" + path + "/config"); ProcessBuilder builder = new ProcessBuilder(params); builder.directory(path.toFile());