brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [06/13] brooklyn-library git commit: Define MAIN_URI inside SolrServer
Date Mon, 07 Mar 2016 09:32:36 GMT
Define MAIN_URI inside SolrServer


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

Branch: refs/heads/master
Commit: 90771002bca95a1cef1fb05ca9951abefbae2900
Parents: cbb58b9
Author: Valentin Aitken <bostko@gmail.com>
Authored: Fri Mar 4 17:46:28 2016 +0200
Committer: Valentin Aitken <bostko@gmail.com>
Committed: Fri Mar 4 17:46:28 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java  | 5 +++++
 .../org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java   | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/90771002/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
index 702d595..884f082 100644
--- a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
+++ b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServer.java
@@ -18,12 +18,15 @@
  */
 package org.apache.brooklyn.entity.nosql.solr;
 
+import java.net.URI;
 import java.util.Map;
 
 import org.apache.brooklyn.api.catalog.Catalog;
 import org.apache.brooklyn.api.entity.ImplementedBy;
+import org.apache.brooklyn.api.sensor.AttributeSensor;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.ConfigKeys;
+import org.apache.brooklyn.core.entity.Attributes;
 import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
 import org.apache.brooklyn.core.location.PortRanges;
 import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
@@ -74,6 +77,8 @@ public interface SolrServer extends SoftwareProcess, UsesJava, UsesJmx,
UsesJava
 
     ConfigKey<Duration> START_TIMEOUT = ConfigKeys.newConfigKeyWithDefault(BrooklynConfigKeys.START_TIMEOUT,
Duration.FIVE_MINUTES);
 
+    AttributeSensor<URI> MAIN_URI = Attributes.MAIN_URI;
+
     /* Accessors used from template */
 
     Integer getSolrPort();

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/90771002/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
index 98fa91e..be0c7e8 100644
--- a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
+++ b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/solr/SolrServerImpl.java
@@ -55,7 +55,7 @@ public class SolrServerImpl extends SoftwareProcessImpl implements SolrServer
{
         HostAndPort hp = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, getSolrPort());
 
         String solrUri = String.format("http://%s:%d/solr", hp.getHostText(), hp.getPort());
-        sensors().set(Attributes.MAIN_URI, URI.create(solrUri));
+        sensors().set(MAIN_URI, URI.create(solrUri));
 
         httpFeed = HttpFeed.builder()
                 .entity(this)


Mime
View raw message