]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4898 - Removed default ES debug
authorStephane Gamard <stephane.gamard@searchbox.com>
Tue, 15 Jul 2014 22:24:56 +0000 (00:24 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Tue, 15 Jul 2014 22:24:56 +0000 (00:24 +0200)
server/sonar-search/src/main/java/org/sonar/search/ElasticSearch.java
sonar-start/src/main/java/org/sonar/start/StartServer.java

index f65655e0314e8657ba7f6cca082236c6694cb625..e07850b285d5f86f8b25fbe68d42c25427abc709 100644 (file)
@@ -87,13 +87,13 @@ public class ElasticSearch extends Process {
       .put("transport.tcp.port", port)
       .put("path.home", home);
 
-//    if (props.booleanOf(ES_DEBUG_PROPERTY, false)) {
-    esSettings
-      .put("http.enabled", true)
-      .put("http.port", 9200);
-//    } else {
-//      esSettings.put("http.enabled", false);
-//    }
+    if (props.booleanOf(ES_DEBUG_PROPERTY, false)) {
+      esSettings
+        .put("http.enabled", true)
+        .put("http.port", 9200);
+    } else {
+      esSettings.put("http.enabled", false);
+    }
 
     node = NodeBuilder.nodeBuilder()
       .settings(esSettings)
index 5f02af508ecf116ebaf65fd1d2561232161091bd..fa8ea9ff6586c1a788ad22522ee23b24b403678e 100644 (file)
@@ -70,19 +70,11 @@ public final class StartServer {
   public void start() {
 
     // Start ES
-    this.startES(NetworkUtils.freePort());
+    //this.startES(NetworkUtils.freePort());
 
-    while (!elasticsearch.isReady()) {
-      LOGGER.info("Waiting for ES");
-      try {
-        Thread.sleep(1000);
-      } catch (InterruptedException e) {
-        e.printStackTrace();
-      }
-    }
 
     // Start SQ
-    //this.startSQ(NetworkUtils.freePort());
+    this.startSQ(NetworkUtils.freePort());
 
 //    // And monitor the activity
 //    try {
@@ -114,6 +106,15 @@ public final class StartServer {
         "esHome", env.rootDir().getAbsolutePath()),
       "ES", port,
       env.rootDir().getAbsolutePath() + "/lib/search/sonar-search-4.5-SNAPSHOT.jar");
+
+    while (!elasticsearch.isReady()) {
+      LOGGER.info("Waiting for ES");
+      try {
+        Thread.sleep(1000);
+      } catch (InterruptedException e) {
+        e.printStackTrace();
+      }
+    }
   }
 
   public static void main(String... args) throws InterruptedException, IOException, URISyntaxException {