brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [2/4] brooklyn-library git commit: Set proper datastore.url in ElasticSearch
Date Thu, 20 Oct 2016 12:34:41 GMT
Set proper datastore.url in ElasticSearch


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/8b58040c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/8b58040c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/8b58040c

Branch: refs/heads/master
Commit: 8b58040cfa070232222a75255928e842d0342501
Parents: a9e9c25
Author: Valentin Aitken <bostko@gmail.com>
Authored: Wed Oct 19 18:36:20 2016 +0100
Committer: Valentin Aitken <bostko@gmail.com>
Committed: Wed Oct 19 18:36:47 2016 +0100

----------------------------------------------------------------------
 .../entity/nosql/elasticsearch/ElasticSearchNodeImpl.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/8b58040c/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
index ccb09e8..6bc89df 100644
--- a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
+++ b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
@@ -72,9 +72,7 @@ public class ElasticSearchNodeImpl extends SoftwareProcessImpl implements
Elasti
         Integer rawPort = getAttribute(HTTP_PORT);
         String hostname = getAttribute(HOSTNAME);
         checkNotNull(rawPort, "HTTP_PORT sensors not set for %s; is an acceptable port available?",
this);
-        
-        sensors().set(DATASTORE_URL, String.format("http://%s:%s", hostname, rawPort));
-        
+
         HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, rawPort);
         Function<Maybe<JsonElement>, String> getNodeId = new Function<Maybe<JsonElement>,
String>() {
             @Override public String apply(Maybe<JsonElement> input) {
@@ -85,6 +83,7 @@ public class ElasticSearchNodeImpl extends SoftwareProcessImpl implements
Elasti
             }
         };
 
+        sensors().set(DATASTORE_URL, String.format("http://%s", hp));
         if (isHttpMonitoringEnabled()) {
             boolean retrieveUsageMetrics = getConfig(RETRIEVE_USAGE_METRICS);
 


Mime
View raw message