diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-25 16:00:18 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-25 17:39:13 +0200 |
commit | 70dfdc0bdcff5bfd6924c2832c5fdff69d1f201a (patch) | |
tree | 18f7664ac3756d9f99266622d2d9cae222d3803c /server/sonar-search | |
parent | 8eceec4c11715b83faf6a7bff745b3f5e383fd11 (diff) | |
download | sonarqube-70dfdc0bdcff5bfd6924c2832c5fdff69d1f201a.tar.gz sonarqube-70dfdc0bdcff5bfd6924c2832c5fdff69d1f201a.zip |
Disable process monitoring when in debug with agentlib:jdwt
Diffstat (limited to 'server/sonar-search')
-rw-r--r-- | server/sonar-search/src/main/java/org/sonar/search/SearchServer.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java index 500665221fc..aecfb401eda 100644 --- a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java +++ b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java @@ -21,6 +21,7 @@ package org.sonar.search; import org.apache.commons.lang.StringUtils; import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; +import org.elasticsearch.common.annotations.VisibleForTesting; import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.node.Node; @@ -58,7 +59,8 @@ public class SearchServer extends MonitoredProcess { private Node node; - public SearchServer(final Props props, boolean monitored, boolean blocking) { + @VisibleForTesting + SearchServer(final Props props, boolean monitored, boolean blocking) { super(props, monitored); this.isBlocking = blocking; @@ -71,7 +73,14 @@ public class SearchServer extends MonitoredProcess { } public SearchServer(Props props) { - this(props, true, true); + super(props); + this.isBlocking = false; + new MinimumViableSystem().check(); + + String esNodesInets = props.of(ES_CLUSTER_INET); + if (StringUtils.isNotEmpty(esNodesInets)) { + Collections.addAll(nodes, esNodesInets.split(",")); + } } @Override |