]> source.dussan.org Git - sonarqube.git/commitdiff
dropped marvel property
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>
Fri, 22 Sep 2017 16:03:42 +0000 (18:03 +0200)
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>
Mon, 25 Sep 2017 11:09:44 +0000 (13:09 +0200)
"sonar.search.marvelHosts" was an internal property, used to enable marvel managing of the embedded Elasticsearch process.

server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java
server/sonar-process/src/main/java/org/sonar/process/es/EsSettings.java
server/sonar-process/src/test/java/org/sonar/process/es/EsSettingsTest.java

index a0eb3bd6ea7b6e063d64703b5a4992cac8b6cf4f..e5358d4bc290cbc88e77299db6f6c2c4f2b995b6 100644 (file)
@@ -57,7 +57,6 @@ public class ProcessProperties {
   public static final String SEARCH_REPLICAS = "sonar.search.replicas";
   public static final String SEARCH_MINIMUM_MASTER_NODES = "sonar.search.minimumMasterNodes";
   public static final String SEARCH_INITIAL_STATE_TIMEOUT = "sonar.search.initialStateTimeout";
-  public static final String SEARCH_MARVEL_HOSTS = "sonar.search.marvelHosts";
 
   public static final String WEB_JAVA_OPTS = "sonar.web.javaOpts";
   public static final String WEB_JAVA_ADDITIONAL_OPTS = "sonar.web.javaAdditionalOpts";
index 223bae8c239a037b4d5a66fd00e248891b0e182b..42eac51eea0f4e96e3b88a2d1e4ee70309329a98 100644 (file)
@@ -21,13 +21,9 @@ package org.sonar.process.es;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
 import java.util.UUID;
-import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.process.ProcessProperties;
@@ -39,7 +35,6 @@ import static org.sonar.cluster.ClusterProperties.CLUSTER_ENABLED;
 import static org.sonar.cluster.ClusterProperties.CLUSTER_NAME;
 import static org.sonar.cluster.ClusterProperties.CLUSTER_NODE_NAME;
 import static org.sonar.cluster.ClusterProperties.CLUSTER_SEARCH_HOSTS;
-import static org.sonar.process.ProcessProperties.SEARCH_MARVEL_HOSTS;
 
 public class EsSettings {
 
@@ -76,7 +71,6 @@ public class EsSettings {
     configureFileSystem(builder);
     configureNetwork(builder);
     configureCluster(builder);
-    configureMarvel(builder);
     configureAction(builder);
     return builder;
   }
@@ -148,18 +142,6 @@ public class EsSettings {
     builder.put("node.master", valueOf(true));
   }
 
-  private void configureMarvel(Map<String, String> builder) {
-    Set<String> marvels = new TreeSet<>();
-    marvels.addAll(Arrays.asList(StringUtils.split(props.value(SEARCH_MARVEL_HOSTS, ""), ",")));
-
-    // If we're collecting indexing data send them to the Marvel host(s)
-    if (!marvels.isEmpty()) {
-      String hosts = StringUtils.join(marvels, ",");
-      LOGGER.info("Elasticsearch Marvel is enabled for %s", hosts);
-      builder.put("marvel.agent.exporter.es.hosts", hosts);
-    }
-  }
-
   private static void configureAction(Map<String, String> builder) {
     builder.put("action.auto_create_index", String.valueOf(false));
   }
index 2185051df69a07fced0da2371521244b712bc748..d8bc647ae7cfab436cd23cef436ed73d366c595e 100644 (file)
@@ -268,15 +268,6 @@ public class EsSettingsTest {
     assertThat(settings.get("discovery.zen.minimum_master_nodes")).isEqualTo("1");
   }
 
-  @Test
-  public void enable_marvel() throws Exception {
-    Props props = minProps(CLUSTER_DISABLED);
-    props.set("sonar.search.marvelHosts", "127.0.0.2,127.0.0.3");
-    Map<String, String> settings = new EsSettings(props, new EsFileSystem(props), System2.INSTANCE).build();
-
-    assertThat(settings.get("marvel.agent.exporter.es.hosts")).isEqualTo("127.0.0.2,127.0.0.3");
-  }
-
   @Test
   public void enable_http_connector() throws Exception {
     Props props = minProps(CLUSTER_DISABLED);