From 7379258f2eb6eb216882f1eb0397bcbd34aa5930 Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 3 May 2011 16:43:52 +0300 Subject: [PATCH] use different settings for aws proxy port / host --- .../java/org/elasticsearch/cloud/aws/AwsEc2Service.java | 8 ++++---- .../java/org/elasticsearch/cloud/aws/AwsS3Service.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java b/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java index 989ecc64b61..33910c36022 100644 --- a/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java +++ b/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java @@ -68,14 +68,14 @@ public class AwsEc2Service extends AbstractLifecycleComponent { throw new ElasticSearchIllegalArgumentException("No s3 secret_key defined for s3 gateway"); } - String proxyHost = settings.get("network.proxyHost"); + String proxyHost = componentSettings.get("proxy_host"); if (proxyHost != null) { - String portString = settings.get("network.proxyPort","80"); + String portString = componentSettings.get("proxy_port", "80"); Integer proxyPort; try { - proxyPort = Integer.parseInt(portString,10); + proxyPort = Integer.parseInt(portString, 10); } catch (NumberFormatException ex) { - throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid",ex); + throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex); } clientConfiguration.withProxyHost(proxyHost).setProxyPort(proxyPort); } diff --git a/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsS3Service.java b/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsS3Service.java index 28539e1be7d..766ddaf661f 100644 --- a/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsS3Service.java +++ b/plugins/cloud/aws/src/main/java/org/elasticsearch/cloud/aws/AwsS3Service.java @@ -68,14 +68,14 @@ public class AwsS3Service extends AbstractLifecycleComponent { throw new ElasticSearchIllegalArgumentException("No s3 secret_key defined for s3 gateway"); } - String proxyHost = settings.get("network.proxyHost"); + String proxyHost = componentSettings.get("proxy_host"); if (proxyHost != null) { - String portString = settings.get("network.proxyPort","80"); + String portString = componentSettings.get("proxy_port", "80"); Integer proxyPort; try { - proxyPort = Integer.parseInt(portString,10); + proxyPort = Integer.parseInt(portString, 10); } catch (NumberFormatException ex) { - throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid",ex); + throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex); } clientConfiguration.withProxyHost(proxyHost).setProxyPort(proxyPort); }