]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8798 SearchServer starts external ES 5 process
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>
Thu, 29 Jun 2017 12:17:10 +0000 (14:17 +0200)
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>
Wed, 9 Aug 2017 13:09:54 +0000 (15:09 +0200)
This includes to package Elasticsearch 5.0.2 in the SonarQube application

This change is required, because Elasticsearch versions later 5 do not provide support for running Elasticsearch “embedded” anymore.

115 files changed:
server/sonar-search/pom.xml
server/sonar-search/src/main/java/org/sonar/search/EsSettings.java
server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
server/sonar-search/src/test/java/org/sonar/search/EsSettingsTest.java
server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java
server/sonar-server/pom.xml
server/sonar-server/src/main/java/org/sonar/server/es/EsClientProvider.java
server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java
sonar-application/assembly.xml
sonar-application/pom.xml
sonar-application/src/main/assembly/elasticsearch/LICENSE.txt [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/NOTICE.txt [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/README.textile [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/VERSION.txt [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch [new file with mode: 0755]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-plugin [new file with mode: 0755]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-plugin.bat [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-mgr.exe [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x64.exe [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x86.exe [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service.bat [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-systemd-pre-exec [new file with mode: 0755]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-translog [new file with mode: 0755]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-translog.bat [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.bat [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.in.bat [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.in.sh [new file with mode: 0755]
sonar-application/src/main/assembly/elasticsearch/config/elasticsearch.yml [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/config/jvm.options [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/config/log4j2.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/HdrHistogram-2.1.6.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/elasticsearch-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/hppc-0.7.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/jackson-core-2.8.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-cbor-2.8.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-smile-2.8.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-yaml-2.8.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/jna-4.2.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/joda-time-2.9.5.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/jopt-simple-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/jts-1.13.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/log4j-1.2-api-2.6.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/log4j-api-2.6.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/log4j-core-2.6.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-analyzers-common-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-backward-codecs-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-core-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-grouping-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-highlighter-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-join-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-memory-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-misc-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-queries-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-queryparser-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-sandbox-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-extras-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial3d-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/lucene-suggest-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/securesm-1.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/snakeyaml-1.15.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/spatial4j-0.6.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/lib/t-digest-3.0.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/aggs-matrix-stats/aggs-matrix-stats-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/aggs-matrix-stats/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/ingest-common-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/jcodings-1.0.12.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/joni-2.1.6.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/antlr4-runtime-4.5.1-1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-5.0.4.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-commons-5.0.4.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-tree-5.0.4.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lang-expression-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lucene-expressions-6.2.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/plugin-security.policy [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/groovy-2.4.6-indy.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/lang-groovy-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/plugin-security.policy [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/compiler-0.9.3.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/lang-mustache-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/plugin-security.policy [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/antlr4-runtime-4.5.1-1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/asm-debug-all-5.1.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/lang-painless-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/plugin-security.policy [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/percolator/percolator-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/percolator/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-codec-1.10.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-logging-1.1.3.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpasyncclient-4.1.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpclient-4.5.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-4.4.5.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-nio-4.4.5.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/reindex-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/reindex/rest-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/netty-3.10.6.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/plugin-security.policy [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/transport-netty3-5.0.2.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-buffer-4.1.5.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-4.1.5.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-http-4.1.5.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-common-4.1.5.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-handler-4.1.5.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-resolver-4.1.5.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-transport-4.1.5.Final.jar [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/plugin-descriptor.properties [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/plugin-security.policy [new file with mode: 0644]
sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/transport-netty4-5.0.2.jar [new file with mode: 0644]

index 4f56354b14c76fd9d173ebf03810fd4da5df27bb..7d4b3282a2841ce03eb9d679fb72265b1994fb77 100644 (file)
       <artifactId>sonar-process</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.elasticsearch</groupId>
-      <artifactId>elasticsearch</artifactId>
-    </dependency>
     <dependency>
       <groupId>net.java.dev.jna</groupId>
       <artifactId>jna</artifactId>
index 94532b2761daa6d2933d77b8b6b546d446297410..ce8c668f5282b1d7a24b124384dfda000a8a3b01 100644 (file)
@@ -23,6 +23,8 @@ import java.io.File;
 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;
@@ -74,17 +76,17 @@ public class EsSettings implements EsSettingsMBean {
     return nodeName;
   }
 
-  Settings build() {
-    Settings.Builder builder = Settings.builder();
+  Map<String, String> build() {
+    Map<String, String> builder = new HashMap<>();
     configureFileSystem(builder);
     configureIndexDefaults(builder);
     configureNetwork(builder);
     configureCluster(builder);
     configureMarvel(builder);
-    return builder.build();
+    return builder;
   }
 
-  private void configureFileSystem(Settings.Builder builder) {
+  private void configureFileSystem(Map<String, String> builder) {
     File homeDir = props.nonNullValueAsFile(ProcessProperties.PATH_HOME);
     File dataDir;
     File logDir;
@@ -99,7 +101,7 @@ public class EsSettings implements EsSettingsMBean {
     builder.put("path.data", dataDir.getAbsolutePath());
 
     String tempPath = props.value(ProcessProperties.PATH_TEMP);
-    builder.put("path.home", new File(tempPath, "es"));
+    builder.put("path.home", new File(tempPath, "es").getAbsolutePath());
 
     // log dir
     String logPath = props.value(ProcessProperties.PATH_LOGS);
@@ -111,31 +113,30 @@ public class EsSettings implements EsSettingsMBean {
     builder.put("path.logs", logDir.getAbsolutePath());
   }
 
-  private void configureNetwork(Settings.Builder builder) {
+  private void configureNetwork(Map<String, String> builder) {
     InetAddress host = readHost();
     int port = Integer.parseInt(props.nonNullValue(ProcessProperties.SEARCH_PORT));
     LOGGER.info("Elasticsearch listening on {}:{}", host, port);
 
-    builder
-      .put("transport.tcp.port", port)
-      .put("transport.host", host.getHostAddress())
-      .put("network.host", host.getHostAddress());
+    builder.put("transport.tcp.port", String.valueOf(port));
+    builder.put("transport.host", String.valueOf(host.getHostAddress()));
+    builder.put("network.host", String.valueOf(host.getHostAddress()));
 
     // Elasticsearch sets the default value of TCP reuse address to true only on non-MSWindows machines, but why ?
-    builder.put("network.tcp.reuse_address", true);
+    builder.put("network.tcp.reuse_address", String.valueOf(true));
 
     int httpPort = getHttpPort();
     if (httpPort < 0) {
       // standard configuration
-      builder.put("http.enabled", false);
+      builder.put("http.enabled", String.valueOf(false));
     } else {
       LOGGER.warn("Elasticsearch HTTP connector is enabled on port {}. MUST NOT BE USED FOR PRODUCTION", httpPort);
       // see https://github.com/lmenezes/elasticsearch-kopf/issues/195
-      builder.put("http.cors.enabled", true)
-        .put("http.cors.allow-origin", "*")
-        .put("http.enabled", true)
-        .put("http.host", host.getHostAddress())
-        .put("http.port", httpPort);
+      builder.put("http.cors.enabled", String.valueOf(true));
+      builder.put("http.cors.allow-origin", "*");
+      builder.put("http.enabled", String.valueOf(true));
+      builder.put("http.host", host.getHostAddress());
+      builder.put("http.port", String.valueOf(httpPort));
     }
   }
 
@@ -157,7 +158,7 @@ public class EsSettings implements EsSettingsMBean {
       .put("action.auto_create_index", false);
   }
 
-  private void configureCluster(Settings.Builder builder) {
+  private void configureCluster(Map<String, String> builder) {
     // Default value in a standalone mode, not overridable
     int replicationFactor = 0;
     int minimumMasterNodes = 1;
@@ -173,18 +174,18 @@ public class EsSettings implements EsSettingsMBean {
       builder.put("discovery.zen.ping.unicast.hosts", hosts);
     }
 
-    builder.put("discovery.zen.minimum_master_nodes", minimumMasterNodes)
-      .put("discovery.initial_state_timeout", initialStateTimeOut)
-      .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, replicationFactor)
-      .put("cluster.name", getClusterName())
-      .put("cluster.routing.allocation.awareness.attributes", "rack_id")
-      .put("node.attr.rack_id", nodeName)
-      .put("node.name", nodeName)
-      .put("node.data", true)
-      .put("node.master", true);
+    builder.put("discovery.zen.minimum_master_nodes", String.valueOf(minimumMasterNodes));
+    builder.put("discovery.initial_state_timeout", initialStateTimeOut);
+    builder.put("index.number_of_replicas", String.valueOf(replicationFactor));
+    builder.put("cluster.name", getClusterName());
+    builder.put("cluster.routing.allocation.awareness.attributes", "rack_id");
+    builder.put("node.attr.rack_id", nodeName);
+    builder.put("node.name", nodeName);
+    builder.put("node.data", String.valueOf(true));
+    builder.put("node.master", String.valueOf(true));
   }
 
-  private void configureMarvel(Settings.Builder builder) {
+  private void configureMarvel(Map<String, String> builder) {
     Set<String> marvels = new TreeSet<>();
     marvels.addAll(Arrays.asList(StringUtils.split(props.value(PROP_MARVEL_HOSTS, ""), ",")));
 
index bdcce3718ab20f1e891b96f7abee87f3c482b49c..550675f63a2d0403ab0668f154ab120ca080b713 100644 (file)
  */
 package org.sonar.search;
 
+import java.io.BufferedReader;
+import java.io.File;
 import java.io.IOException;
-import org.apache.lucene.util.StringHelper;
-import org.elasticsearch.cluster.health.ClusterHealthStatus;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.node.Node;
-import org.elasticsearch.node.NodeValidationException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.stream.Collectors;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.sonar.process.Jmx;
 import org.sonar.process.MinimumViableSystem;
 import org.sonar.process.Monitored;
 import org.sonar.process.ProcessEntryPoint;
@@ -38,10 +45,9 @@ public class SearchServer implements Monitored {
   // VisibleForTesting
   protected static Logger LOGGER = LoggerFactory.getLogger(SearchServer.class);
 
-  private static final String MIMINUM_MASTER_NODES = "discovery.zen.minimum_master_nodes";
-  private static final String INITIAL_STATE_TIMEOUT = "discovery.initial_state_timeout";
   private final EsSettings settings;
-  private Node node;
+  private Process p;
+  private String url;
 
   public SearchServer(Props props) {
     this.settings = new EsSettings(props);
@@ -51,37 +57,114 @@ public class SearchServer implements Monitored {
 
   @Override
   public void start() {
-    Jmx.register(EsSettingsMBean.OBJECT_NAME, settings);
-    initBootstrap();
-    Settings esSettings = settings.build();
-    if (esSettings.getAsInt(MIMINUM_MASTER_NODES, 1) >= 2) {
-      LOGGER.info("Elasticsearch is waiting {} for {} node(s) to be up to start.",
-        esSettings.get(INITIAL_STATE_TIMEOUT),
-        esSettings.get(MIMINUM_MASTER_NODES));
+    Path path = Paths.get(getExecutable());
+    if (!path.toFile().exists()) {
+      throw new IllegalStateException("Cannot find elasticsearch binary");
     }
-    node = new Node(settings.build());
+    String absolutePath = path.toAbsolutePath().toString();
+
+    List<String> command = new ArrayList<>();
+    command.add(absolutePath);
+    Map<String, String> settingsMap = settings.build();
+    settingsMap.entrySet().stream()
+      .filter(entry -> !"path.home".equals(entry.getKey()))
+      .forEach(entry -> command.add("-E" + entry.getKey() + "=" + entry.getValue()));
+    url = "http://"+settingsMap.get("http.host") + ":" + settingsMap.get("http.port");
+    System.out.println(command.stream().collect(Collectors.joining(" ")));
+    ProcessBuilder builder = new ProcessBuilder(command)
+      .directory(new File(path.getParent().toAbsolutePath().toString()));
+    builder.redirectOutput(ProcessBuilder.Redirect.PIPE);
+    builder.redirectErrorStream(true);
+    try {
+      p = builder.start();
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    }
+
+    CountDownLatch latch = new CountDownLatch(2);
+
+    new Thread(() -> {
+      InputStream inputStream = p.getInputStream();
+      InputStreamReader reader1 = new InputStreamReader(inputStream);
+      BufferedReader reader = new BufferedReader(reader1);
+      String line;
+      try {
+        while ((line = reader.readLine()) != null) {
+          System.out.println(line);
+          if (line.contains(" publish_address ")) {
+            latch.countDown();
+          }
+          if (line.contains(" started")) {
+            latch.countDown();
+          }
+        }
+      } catch (IOException e) {
+        e.printStackTrace();
+      }
+    }).start();
+
     try {
-      node.start();
-    } catch (NodeValidationException e) {
-      throw new RuntimeException("Failed to start ES", e);
+      latch.await();
+    } catch (InterruptedException e) {
+      // no action required
+    }
+
+    String urlString = url+"/_cluster/health?wait_for_status=yellow&timeout=30s";
+    try {
+      URL url = new URL(urlString);
+      url.openConnection();
+    } catch (MalformedURLException e) {
+      e.printStackTrace();
+    } catch (IOException e) {
+      e.printStackTrace();
     }
   }
 
-  // copied from https://github.com/elastic/elasticsearch/blob/v2.3.3/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java
-  private static void initBootstrap() {
-    // init lucene random seed. it will use /dev/urandom where available:
-    StringHelper.randomId();
+  private static String getExecutable() {
+    if (System.getProperty("os.name").startsWith("Windows")) {
+      return "elasticsearch/bin/elasticsearch.bat";
+    }
+    return "elasticsearch/bin/elasticsearch";
   }
 
   @Override
   public Status getStatus() {
-    boolean esStatus = node != null && node.client().admin().cluster().prepareHealth()
-      .setWaitForYellowStatus()
-      .setTimeout(TimeValue.timeValueSeconds(30L))
-      .get()
-      .getStatus() != ClusterHealthStatus.RED;
-    if (esStatus) {
-      return Status.OPERATIONAL;
+    Status status = null;
+    try {
+      status = getStatus2();
+      System.out.println("ES STATUS "+status);
+      return status;
+    } catch (Exception e) {
+      System.out.println("ES STATUS "+e.getMessage());
+      throw new RuntimeException(e);
+    }
+  }
+
+  private Status getStatus2() {
+    String urlString = url+"/_cluster/health";
+    try {
+      URL url = new URL(urlString);
+      URLConnection urlConnection = url.openConnection();
+      InputStream inputStream = urlConnection.getInputStream();
+      String line;
+      BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+      while ((line = reader.readLine()) != null) {
+        if (line.contains("\"status\"")) {
+          if (line.contains("\"red\"")) {
+            return Status.DOWN;
+          }
+          if (line.contains("\"yellow\"")) {
+            return Status.OPERATIONAL;
+          }
+          if (line.contains("\"green\"")) {
+            return Status.OPERATIONAL;
+          }
+        }
+      }
+    } catch (MalformedURLException e) {
+      e.printStackTrace();
+    } catch (IOException e) {
+      e.printStackTrace();
     }
     return Status.DOWN;
   }
@@ -89,25 +172,29 @@ public class SearchServer implements Monitored {
   @Override
   public void awaitStop() {
     try {
-      while (node != null && !node.isClosed()) {
+      while (p != null && p.isAlive()) {
         Thread.sleep(200L);
       }
     } catch (InterruptedException e) {
-      // Restore the interrupted status
-      Thread.currentThread().interrupt();
+      e.printStackTrace();
+    }
+
+    if (p != null) {
+      p.destroy();
+      try {
+        p.waitFor();
+      } catch (InterruptedException e) {
+        e.printStackTrace();
+      }
     }
   }
 
   @Override
   public void stop() {
-    if (node != null && !node.isClosed()) {
-      try {
-        node.close();
-      } catch (IOException e) {
-        LOGGER.error("Failed to stop ES cleanly", e);
-      }
+    if (p != null) {
+      p.destroyForcibly();
     }
-    Jmx.unregister(EsSettingsMBean.OBJECT_NAME);
+    //Jmx.unregister(EsSettingsMBean.OBJECT_NAME);
   }
 
   public static void main(String... args) {
index 9abbb3248b111f1a07e25a8138cbe40e9a82ac8f..583dfdcb9b430219eab83e44bb607fe9079e330a 100644 (file)
@@ -21,8 +21,8 @@ package org.sonar.search;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Map;
 import java.util.Properties;
-import org.elasticsearch.common.settings.Settings;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -51,7 +51,7 @@ public class EsSettingsTest {
 
     EsSettings esSettings = new EsSettings(props);
 
-    Settings generated = esSettings.build();
+    Map<String, String> generated = esSettings.build();
     assertThat(generated.get("transport.tcp.port")).isEqualTo("1234");
     assertThat(generated.get("transport.host")).isEqualTo("127.0.0.1");
 
@@ -82,7 +82,7 @@ public class EsSettingsTest {
     props.set(ProcessProperties.PATH_LOGS, logDir.getAbsolutePath());
     props.set(ProcessProperties.PATH_TEMP, tempDir.getAbsolutePath());
 
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("path.data")).isEqualTo(new File(dataDir, "es").getAbsolutePath());
     assertThat(settings.get("path.logs")).isEqualTo(logDir.getAbsolutePath());
@@ -93,7 +93,7 @@ public class EsSettingsTest {
   public void cluster_is_enabled() throws Exception {
     Props props = minProps(true);
     props.set(ProcessProperties.CLUSTER_SEARCH_HOSTS, "1.2.3.4:9000,1.2.3.5:8080");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("index.number_of_replicas")).isEqualTo("1");
     assertThat(settings.get("discovery.zen.ping.unicast.hosts")).isEqualTo("1.2.3.4:9000,1.2.3.5:8080");
@@ -108,14 +108,14 @@ public class EsSettingsTest {
 
     expectedException.expect(IllegalStateException.class);
     expectedException.expectMessage("Value of property sonar.search.minimumMasterNodes is not an integer:");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
   }
 
   @Test
   public void cluster_is_enabled_with_defined_minimum_master_nodes() throws Exception {
     Props props = minProps(true);
     props.set(ProcessProperties.SEARCH_MINIMUM_MASTER_NODES, "5");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("discovery.zen.minimum_master_nodes")).isEqualTo("5");
   }
@@ -124,7 +124,7 @@ public class EsSettingsTest {
   public void cluster_is_enabled_with_defined_initialTimeout() throws Exception {
     Props props = minProps(true);
     props.set(ProcessProperties.SEARCH_INITIAL_STATE_TIMEOUT, "10s");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("discovery.initial_state_timeout")).isEqualTo("10s");
   }
@@ -133,7 +133,7 @@ public class EsSettingsTest {
   public void in_standalone_initialTimeout_is_not_overridable() throws Exception {
     Props props = minProps(false);
     props.set(ProcessProperties.SEARCH_INITIAL_STATE_TIMEOUT, "10s");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("discovery.initial_state_timeout")).isEqualTo("30s");
   }
@@ -142,7 +142,7 @@ public class EsSettingsTest {
   public void in_standalone_minimumMasterNodes_is_not_overridable() throws Exception {
     Props props = minProps(false);
     props.set(ProcessProperties.SEARCH_MINIMUM_MASTER_NODES, "5");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("discovery.zen.minimum_master_nodes")).isEqualTo("1");
   }
@@ -152,7 +152,7 @@ public class EsSettingsTest {
   public void in_standalone_searchReplicas_is_not_overridable() throws Exception {
     Props props = minProps(false);
     props.set(ProcessProperties.SEARCH_REPLICAS, "5");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("index.number_of_replicas")).isEqualTo("0");
   }
@@ -161,7 +161,7 @@ public class EsSettingsTest {
   public void cluster_is_enabled_with_defined_replicas() throws Exception {
     Props props = minProps(true);
     props.set(ProcessProperties.SEARCH_REPLICAS, "5");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("index.number_of_replicas")).isEqualTo("5");
   }
@@ -174,14 +174,14 @@ public class EsSettingsTest {
 
     expectedException.expect(IllegalStateException.class);
     expectedException.expectMessage("Value of property sonar.search.replicas is not an integer:");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
   }
 
   @Test
   public void enable_marvel() throws Exception {
     Props props = minProps(false);
     props.set(EsSettings.PROP_MARVEL_HOSTS, "127.0.0.2,127.0.0.3");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("marvel.agent.exporter.es.hosts")).isEqualTo("127.0.0.2,127.0.0.3");
   }
@@ -190,7 +190,7 @@ public class EsSettingsTest {
   public void enable_http_connector() throws Exception {
     Props props = minProps(false);
     props.set(ProcessProperties.SEARCH_HTTP_PORT, "9010");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("http.port")).isEqualTo("9010");
     assertThat(settings.get("http.host")).isEqualTo("127.0.0.1");
@@ -202,7 +202,7 @@ public class EsSettingsTest {
     Props props = minProps(false);
     props.set(ProcessProperties.SEARCH_HTTP_PORT, "9010");
     props.set(ProcessProperties.SEARCH_HOST, "127.0.0.2");
-    Settings settings = new EsSettings(props).build();
+    Map<String, String> settings = new EsSettings(props).build();
 
     assertThat(settings.get("http.port")).isEqualTo("9010");
     assertThat(settings.get("http.host")).isEqualTo("127.0.0.2");
index a431475b74167f89e008bb03f282b6d617923dd3..5627c78259807802ee5fddbeb9116ba0c7cc723c 100644 (file)
  */
 package org.sonar.search;
 
+import java.io.BufferedReader;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.net.InetAddress;
-import java.util.Collection;
-import java.util.Collections;
+import java.net.URL;
+import java.net.URLConnection;
 import java.util.Properties;
-import org.elasticsearch.client.Client;
-import org.elasticsearch.client.transport.NoNodeAvailableException;
-import org.elasticsearch.client.transport.TransportClient;
-import org.elasticsearch.cluster.health.ClusterHealthStatus;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.transport.InetSocketTransportAddress;
-import org.elasticsearch.plugins.Plugin;
 import org.junit.After;
 import org.junit.Rule;
 import org.junit.Test;
@@ -38,7 +34,6 @@ import org.junit.rules.DisableOnDebug;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
-import org.slf4j.Logger;
 import org.sonar.process.Monitored;
 import org.sonar.process.NetworkUtils;
 import org.sonar.process.ProcessEntryPoint;
@@ -47,10 +42,6 @@ import org.sonar.process.Props;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
 
 public class SearchServerTest {
 
@@ -63,8 +54,8 @@ public class SearchServerTest {
   @Rule
   public TemporaryFolder temp = new TemporaryFolder();
 
+  private int httpPort = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
   private int port = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
-  private Client client;
   private SearchServer underTest;
 
   @After
@@ -73,68 +64,48 @@ public class SearchServerTest {
       underTest.stop();
       underTest.awaitStop();
     }
-    if (client != null) {
-      client.close();
-    }
-  }
-
-  @Test
-  public void log_information_on_startup() throws IOException {
-    Props props = getClusterProperties();
-    props.set(ProcessProperties.CLUSTER_ENABLED, "true");
-    props.set(ProcessProperties.SEARCH_MINIMUM_MASTER_NODES, "2");
-    // Set the timeout to 1sec
-    props.set(ProcessProperties.SEARCH_INITIAL_STATE_TIMEOUT, "1s");
-    underTest = new SearchServer(props);
-    Logger logger = mock(Logger.class);
-    underTest.LOGGER = logger;
-    underTest.start();
-    System.out.println(org.apache.logging.log4j.Logger.class);
-    verify(logger).info(eq("Elasticsearch is waiting {} for {} node(s) to be up to start."), eq("1s"), eq("2"));
-  }
-
-  @Test
-  public void no_log_information_on_startup() throws IOException {
-    Props props = getClusterProperties();
-    props.set(ProcessProperties.SEARCH_MINIMUM_MASTER_NODES, "1");
-    // Set the timeout to 1sec
-    props.set(ProcessProperties.SEARCH_INITIAL_STATE_TIMEOUT, "1s");
-    underTest = new SearchServer(props);
-    Logger logger = mock(Logger.class);
-    underTest.LOGGER = logger;
-    underTest.start();
-    verify(logger, never()).info(eq("Elasticsearch is waiting {} for {} node(s) to be up to start."), eq("1s"), eq("2"));
   }
 
   @Test
   public void start_stop_server() throws Exception {
     underTest = new SearchServer(getClusterProperties());
+
     underTest.start();
     assertThat(underTest.getStatus()).isEqualTo(Monitored.Status.OPERATIONAL);
 
-    Settings settings = Settings.builder().put("cluster.name", A_CLUSTER_NAME).build();
-    Collection<Class<? extends Plugin>> plugins = Collections.emptyList();
-    client = new TransportClient(settings, plugins) {
-
-    }.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), port));
-    assertThat(client.admin().cluster().prepareClusterStats().get().getStatus()).isEqualTo(ClusterHealthStatus.GREEN);
-
     underTest.stop();
     underTest.awaitStop();
-    underTest = null;
     try {
-      client.admin().cluster().prepareClusterStats().get();
+      underTest.getStatus();
       fail();
-    } catch (NoNodeAvailableException exception) {
+    } catch (Exception exception) {
       // ok
     }
   }
 
+  private void waitFor(String expectedStatus) throws Exception {
+    String urlString = "http://localhost:" + httpPort + "/_cluster/health";
+    URL url = new URL(urlString);
+    URLConnection urlConnection = url.openConnection();
+    InputStream inputStream = urlConnection.getInputStream();
+    String line;
+    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+    while ((line = reader.readLine()) != null) {
+      if (line.contains("\"status\"")) {
+        if (line.contains(expectedStatus)) {
+          return;
+        }
+      }
+    }
+    fail();
+  }
+
   private Props getClusterProperties() throws IOException {
     Props props = new Props(new Properties());
     // the following properties have always default values (see ProcessProperties)
     InetAddress host = InetAddress.getLoopbackAddress();
     props.set(ProcessProperties.SEARCH_HOST, host.getHostAddress());
+    props.set(ProcessProperties.SEARCH_HTTP_PORT, String.valueOf(httpPort));
     props.set(ProcessProperties.SEARCH_PORT, String.valueOf(port));
     props.set(ProcessProperties.CLUSTER_NAME, A_CLUSTER_NAME);
     props.set(EsSettings.CLUSTER_SEARCH_NODE_NAME, A_NODE_NAME);
index 59edc4ed98d201bbc5160d348c7451efcacc99cd..322795f5f5f7a2da83415e8a07bf676d068a6c88 100644 (file)
       <groupId>org.slf4j</groupId>
       <artifactId>log4j-over-slf4j</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jul-to-slf4j</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-api</artifactId>
+      <version>2.6.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jul-to-slf4j</artifactId>
     </dependency>
     <dependency>
       <groupId>ch.qos.logback</groupId>
       <groupId>org.elasticsearch</groupId>
       <artifactId>elasticsearch</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.elasticsearch.client</groupId>
+      <artifactId>transport</artifactId>
+      <version>${elasticsearch.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>4.5.2</version>
+    </dependency>
     <dependency>
       <groupId>org.elasticsearch.test</groupId>
       <artifactId>framework</artifactId>
index 8a2f6ed18c32d89b7613fa9beaea84d5eb9aca7a..20ca3bfe8fb77becba7b103205c422eef2c2fd5c 100644 (file)
@@ -23,11 +23,11 @@ import com.google.common.net.HostAndPort;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.stream.Collectors;
 import org.elasticsearch.client.transport.TransportClient;
 import org.elasticsearch.common.transport.InetSocketTransportAddress;
 import org.elasticsearch.common.transport.TransportAddress;
+import org.elasticsearch.transport.client.PreBuiltTransportClient;
 import org.picocontainer.injectors.ProviderAdapter;
 import org.sonar.api.ce.ComputeEngineSide;
 import org.sonar.api.config.Configuration;
@@ -55,13 +55,13 @@ public class EsClientProvider extends ProviderAdapter {
       boolean clusterEnabled = config.getBoolean(ProcessProperties.CLUSTER_ENABLED).orElse(false);
       if (clusterEnabled && config.getBoolean(ProcessProperties.CLUSTER_SEARCH_DISABLED).orElse(false)) {
         esSettings.put("client.transport.sniff", true);
-        nativeClient = new TransportClient(esSettings.build(), Collections.emptyList()) {};
+        nativeClient = new PreBuiltTransportClient(esSettings.build());
         Arrays.stream(config.getStringArray(ProcessProperties.CLUSTER_SEARCH_HOSTS))
           .map(HostAndPort::fromString)
           .forEach(h -> addHostToClient(h, nativeClient));
         LOGGER.info("Connected to remote Elasticsearch: [{}]", displayedAddresses(nativeClient));
       } else {
-        nativeClient = new TransportClient(esSettings.build(), Collections.emptyList()) {};
+        nativeClient = new PreBuiltTransportClient(esSettings.build());
         HostAndPort host = HostAndPort.fromParts(config.get(ProcessProperties.SEARCH_HOST).get(), config.getInt(ProcessProperties.SEARCH_PORT).get());
         addHostToClient(host, nativeClient);
         LOGGER.info("Connected to local Elasticsearch: [{}]", displayedAddresses(nativeClient));
index 02f9a5ca018ff49ec9cbfc0f75b70b04da63e6dd..80da6dd045780ffa514a5f3ca047de40ffe5b0ac 100644 (file)
@@ -22,6 +22,7 @@ package org.sonar.server.es;
 import java.io.IOException;
 import java.util.Map;
 import javax.annotation.CheckForNull;
+import org.elasticsearch.action.support.WriteRequest;
 import org.elasticsearch.cluster.metadata.MappingMetaData;
 import org.elasticsearch.common.collect.ImmutableOpenMap;
 import org.junit.Rule;
@@ -98,7 +99,7 @@ public class IndexCreatorTest {
 
     IndexType fakeIndexType = new IndexType("fakes", "fake");
     String id = "1";
-    es.client().prepareIndex(fakeIndexType).setId(id).setSource(new FakeDoc().getFields()).setRefresh(true).get();
+    es.client().prepareIndex(fakeIndexType).setId(id).setSource(new FakeDoc().getFields()).setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE).get();
     assertThat(es.client().prepareGet(fakeIndexType, id).get().isExists()).isTrue();
 
     // v2
index bdb5076457efbc541f768782ec2c0e7a0674517f..5b523b7caeebc7274235525ed31f5c982f9254aa 100644 (file)
         <include>bin/*/lib/*.dll</include>
         <include>bin/*/wrapper</include>
         <include>bin/*/wrapper.exe</include>
+        <include>elasticsearch/bin/elasticsearch</include>
+        <include>elasticsearch/bin/elasticsearch.bat</include>
       </includes>
       <fileMode>0755</fileMode>
     </fileSet>
index 3eb3ee72e35bc174137d60a01905847bd653d0f3..dc357b099157216bc6503105114d66e3f839857f 100644 (file)
             <configuration>
               <rules>
                 <requireFilesSize>
-                  <minsize>136000000</minsize>
-                  <maxsize>144000000</maxsize>
+                  <minsize>178000000</minsize>
+                  <maxsize>186000000</maxsize>
                   <files>
                     <file>${project.build.directory}/sonarqube-${project.version}.zip</file>
                   </files>
diff --git a/sonar-application/src/main/assembly/elasticsearch/LICENSE.txt b/sonar-application/src/main/assembly/elasticsearch/LICENSE.txt
new file mode 100644 (file)
index 0000000..d645695
--- /dev/null
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/sonar-application/src/main/assembly/elasticsearch/NOTICE.txt b/sonar-application/src/main/assembly/elasticsearch/NOTICE.txt
new file mode 100644 (file)
index 0000000..c99b958
--- /dev/null
@@ -0,0 +1,5 @@
+Elasticsearch
+Copyright 2009-2016 Elasticsearch
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).
diff --git a/sonar-application/src/main/assembly/elasticsearch/README.textile b/sonar-application/src/main/assembly/elasticsearch/README.textile
new file mode 100644 (file)
index 0000000..52c7607
--- /dev/null
@@ -0,0 +1,238 @@
+h1. Elasticsearch
+
+h2. A Distributed RESTful Search Engine
+
+h3. "https://www.elastic.co/products/elasticsearch":https://www.elastic.co/products/elasticsearch
+
+Elasticsearch is a distributed RESTful search engine built for the cloud. Features include:
+
+* Distributed and Highly Available Search Engine.
+** Each index is fully sharded with a configurable number of shards.
+** Each shard can have one or more replicas.
+** Read / Search operations performed on any of the replica shards.
+* Multi Tenant with Multi Types.
+** Support for more than one index.
+** Support for more than one type per index.
+** Index level configuration (number of shards, index storage, ...).
+* Various set of APIs
+** HTTP RESTful API
+** Native Java API.
+** All APIs perform automatic node operation rerouting.
+* Document oriented
+** No need for upfront schema definition.
+** Schema can be defined per type for customization of the indexing process.
+* Reliable, Asynchronous Write Behind for long term persistency.
+* (Near) Real Time Search.
+* Built on top of Lucene
+** Each shard is a fully functional Lucene index
+** All the power of Lucene easily exposed through simple configuration / plugins.
+* Per operation consistency
+** Single document level operations are atomic, consistent, isolated and durable.
+* Open Source under the Apache License, version 2 ("ALv2")
+
+h2. Getting Started
+
+First of all, DON'T PANIC. It will take 5 minutes to get the gist of what Elasticsearch is all about.
+
+h3. Requirements
+
+You need to have a recent version of Java installed. See the "Setup":http://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html#jvm-version page for more information.
+
+h3. Installation
+
+* "Download":https://www.elastic.co/downloads/elasticsearch and unzip the Elasticsearch official distribution.
+* Run @bin/elasticsearch@ on unix, or @bin\elasticsearch.bat@ on windows.
+* Run @curl -X GET http://localhost:9200/@.
+* Start more servers ...
+
+h3. Indexing
+
+Let's try and index some twitter like information. First, let's create a twitter user, and add some tweets (the @twitter@ index will be created automatically):
+
+<pre>
+curl -XPUT 'http://localhost:9200/twitter/user/kimchy?pretty' -d '{ "name" : "Shay Banon" }'
+
+curl -XPUT 'http://localhost:9200/twitter/tweet/1?pretty' -d '
+{
+    "user": "kimchy",
+    "post_date": "2009-11-15T13:12:00",
+    "message": "Trying out Elasticsearch, so far so good?"
+}'
+
+curl -XPUT 'http://localhost:9200/twitter/tweet/2?pretty' -d '
+{
+    "user": "kimchy",
+    "post_date": "2009-11-15T14:12:12",
+    "message": "Another tweet, will it be indexed?"
+}'
+</pre>
+
+Now, let's see if the information was added by GETting it:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/user/kimchy?pretty=true'
+curl -XGET 'http://localhost:9200/twitter/tweet/1?pretty=true'
+curl -XGET 'http://localhost:9200/twitter/tweet/2?pretty=true'
+</pre>
+
+h3. Searching
+
+Mmm search..., shouldn't it be elastic?
+Let's find all the tweets that @kimchy@ posted:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/tweet/_search?q=user:kimchy&pretty=true'
+</pre>
+
+We can also use the JSON query language Elasticsearch provides instead of a query string:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/tweet/_search?pretty=true' -d '
+{
+    "query" : {
+        "match" : { "user": "kimchy" }
+    }
+}'
+</pre>
+
+Just for kicks, let's get all the documents stored (we should see the user as well):
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/_search?pretty=true' -d '
+{
+    "query" : {
+        "match_all" : {}
+    }
+}'
+</pre>
+
+We can also do range search (the @postDate@ was automatically identified as date)
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/_search?pretty=true' -d '
+{
+    "query" : {
+        "range" : {
+            "post_date" : { "from" : "2009-11-15T13:00:00", "to" : "2009-11-15T14:00:00" }
+        }
+    }
+}'
+</pre>
+
+There are many more options to perform search, after all, it's a search product no? All the familiar Lucene queries are available through the JSON query language, or through the query parser.
+
+h3. Multi Tenant - Indices and Types
+
+Maan, that twitter index might get big (in this case, index size == valuation). Let's see if we can structure our twitter system a bit differently in order to support such large amounts of data.
+
+Elasticsearch supports multiple indices, as well as multiple types per index. In the previous example we used an index called @twitter@, with two types, @user@ and @tweet@.
+
+Another way to define our simple twitter system is to have a different index per user (note, though that each index has an overhead). Here is the indexing curl's in this case:
+
+<pre>
+curl -XPUT 'http://localhost:9200/kimchy/info/1?pretty' -d '{ "name" : "Shay Banon" }'
+
+curl -XPUT 'http://localhost:9200/kimchy/tweet/1?pretty' -d '
+{
+    "user": "kimchy",
+    "post_date": "2009-11-15T13:12:00",
+    "message": "Trying out Elasticsearch, so far so good?"
+}'
+
+curl -XPUT 'http://localhost:9200/kimchy/tweet/2?pretty' -d '
+{
+    "user": "kimchy",
+    "post_date": "2009-11-15T14:12:12",
+    "message": "Another tweet, will it be indexed?"
+}'
+</pre>
+
+The above will index information into the @kimchy@ index, with two types, @info@ and @tweet@. Each user will get their own special index.
+
+Complete control on the index level is allowed. As an example, in the above case, we would want to change from the default 5 shards with 1 replica per index, to only 1 shard with 1 replica per index (== per twitter user). Here is how this can be done (the configuration can be in yaml as well):
+
+<pre>
+curl -XPUT http://localhost:9200/another_user?pretty -d '
+{
+    "index" : {
+        "number_of_shards" : 1,
+        "number_of_replicas" : 1
+    }
+}'
+</pre>
+
+Search (and similar operations) are multi index aware. This means that we can easily search on more than one
+index (twitter user), for example:
+
+<pre>
+curl -XGET 'http://localhost:9200/kimchy,another_user/_search?pretty=true' -d '
+{
+    "query" : {
+        "match_all" : {}
+    }
+}'
+</pre>
+
+Or on all the indices:
+
+<pre>
+curl -XGET 'http://localhost:9200/_search?pretty=true' -d '
+{
+    "query" : {
+        "match_all" : {}
+    }
+}'
+</pre>
+
+{One liner teaser}: And the cool part about that? You can easily search on multiple twitter users (indices), with different boost levels per user (index), making social search so much simpler (results from my friends rank higher than results from friends of my friends).
+
+h3. Distributed, Highly Available
+
+Let's face it, things will fail....
+
+Elasticsearch is a highly available and distributed search engine. Each index is broken down into shards, and each shard can have one or more replica. By default, an index is created with 5 shards and 1 replica per shard (5/1). There are many topologies that can be used, including 1/10 (improve search performance), or 20/1 (improve indexing performance, with search executed in a map reduce fashion across shards).
+
+In order to play with the distributed nature of Elasticsearch, simply bring more nodes up and shut down nodes. The system will continue to serve requests (make sure you use the correct http port) with the latest data indexed.
+
+h3. Where to go from here?
+
+We have just covered a very small portion of what Elasticsearch is all about. For more information, please refer to the "elastic.co":http://www.elastic.co/products/elasticsearch website. General questions can be asked on the "Elastic Discourse forum":https://discuss.elastic.co or on IRC on Freenode at "#elasticsearch":https://webchat.freenode.net/#elasticsearch. The Elasticsearch GitHub repository is reserved for bug reports and feature requests only.
+
+h3. Building from Source
+
+Elasticsearch uses "Gradle":https://gradle.org for its build system. You'll need to have version 2.13 of Gradle installed.
+
+In order to create a distribution, simply run the @gradle assemble@ command in the cloned directory.
+
+The distribution for each project will be created under the @build/distributions@ directory in that project.
+
+See the "TESTING":TESTING.asciidoc file for more information about
+running the Elasticsearch test suite.
+
+h3. Upgrading from Elasticsearch 1.x?
+
+In order to ensure a smooth upgrade process from earlier versions of
+Elasticsearch (1.x), it is required to perform a full cluster restart. Please
+see the "setup reference":
+https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html
+for more details on the upgrade process.
+
+h1. License
+
+<pre>
+This software is licensed under the Apache License, version 2 ("ALv2"), quoted below.
+
+Copyright 2009-2016 Elasticsearch <https://www.elastic.co>
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+</pre>
diff --git a/sonar-application/src/main/assembly/elasticsearch/VERSION.txt b/sonar-application/src/main/assembly/elasticsearch/VERSION.txt
new file mode 100644 (file)
index 0000000..f373200
--- /dev/null
@@ -0,0 +1,2 @@
+Elasticsearch 5.0.2
+https://www.elastic.co/downloads/past-releases/elasticsearch-5-0-2
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch
new file mode 100755 (executable)
index 0000000..57d9d38
--- /dev/null
@@ -0,0 +1,200 @@
+#!/bin/bash
+
+# CONTROLLING STARTUP:
+#
+# This script relies on few environment variables to determine startup
+# behavior, those variables are:
+#
+#   ES_CLASSPATH -- A Java classpath containing everything necessary to run.
+#   ES_JVM_OPTIONS -- Path to file containing JVM options
+#   ES_JAVA_OPTS -- External Java Opts on top of the defaults set
+#
+# Optionally, exact memory values can be set using the `ES_JAVA_OPTS`.
+# Note that the Xms and Xmx lines in the JVM options file must be
+# commented out. Sample format include "512m", and "10g".
+#
+#   ES_JAVA_OPTS="-Xms8g -Xmx8g" ./bin/elasticsearch
+#
+# As a convenience, a fragment of shell is sourced in order to set one or
+# more of these variables. This so-called `include' can be placed in a
+# number of locations and will be searched for in order. The lowest
+# priority search path is the same directory as the startup script, and
+# since this is the location of the sample in the project tree, it should
+# almost work Out Of The Box.
+#
+# Any serious use-case though will likely require customization of the
+# include. For production installations, it is recommended that you copy
+# the sample to one of /usr/share/elasticsearch/elasticsearch.in.sh,
+# /usr/local/share/elasticsearch/elasticsearch.in.sh, or
+# /opt/elasticsearch/elasticsearch.in.sh and make your modifications there.
+#
+# Another option is to specify the full path to the include file in the
+# environment. For example:
+#
+#   $ ES_INCLUDE=/path/to/in.sh elasticsearch -p /var/run/es.pid
+#
+# Note: This is particularly handy for running multiple instances on a
+# single installation, or for quick tests.
+#
+# If you would rather configure startup entirely from the environment, you
+# can disable the include by exporting an empty ES_INCLUDE, or by
+# ensuring that no include files exist in the aforementioned search list.
+# Be aware that you will be entirely responsible for populating the needed
+# environment variables.
+
+# Check to see if you are trying to run this without building it first. Gradle
+# will replace the project.name with _something_.
+
+if echo 'distribution' | grep project.name > /dev/null ; then
+    cat >&2 << EOF
+Error: You must build the project with Gradle or download a pre-built package
+before you can run Elasticsearch. See 'Building from Source' in README.textile
+or visit https://www.elastic.co/download to get a pre-built package.
+EOF
+    exit 1
+fi
+
+# TODO: remove for Elasticsearch 6.x
+unsupported_environment_variable() {
+    if test -n "$1"; then
+        echo "$2=$1: $3"
+    fi
+}
+
+if test -n "$ES_MIN_MEM" ||
+   test -n "$ES_MAX_MEM" ||
+   test -n "$ES_HEAP_SIZE" ||
+   test -n "$ES_HEAP_NEWSIZE" ||
+   test -n "$ES_DIRECT_SIZE" ||
+   test -n "$ES_USE_IPV4" ||
+   test -n "$ES_GC_OPTS" ||
+   test -n "$ES_GC_LOG_FILE"; then
+    echo "Error: encountered environment variables that are no longer supported"
+    echo "Use jvm.options or ES_JAVA_OPTS to configure the JVM"
+    unsupported_environment_variable "$ES_MIN_MEM" ES_MIN_MEM "set -Xms$ES_MIN_MEM in jvm.options or add \"-Xms$ES_MIN_MEM\" to ES_JAVA_OPTS"
+    unsupported_environment_variable "$ES_MAX_MEM" ES_MAX_MEM "set -Xmx$ES_MAX_MEM in jvm.options or add \"-Xmx$ES_MAX_MEM\" to ES_JAVA_OPTS"
+    unsupported_environment_variable "$ES_HEAP_SIZE" ES_HEAP_SIZE "set -Xms$ES_HEAP_SIZE and -Xmx$ES_HEAP_SIZE in jvm.options or add \"-Xms$ES_HEAP_SIZE -Xmx$ES_HEAP_SIZE\" to ES_JAVA_OPTS"
+    unsupported_environment_variable "$ES_HEAP_NEWSIZE" ES_HEAP_NEWSIZE "set -Xmn$ES_HEAP_NEWSIZE in jvm.options or add \"-Xmn$ES_HEAP_SIZE\" to ES_JAVA_OPTS"
+    unsupported_environment_variable "$ES_DIRECT_SIZE" ES_DIRECT_SIZE "set -XX:MaxDirectMemorySize=$ES_DIRECT_SIZE in jvm.options or add \"-XX:MaxDirectMemorySize=$ES_DIRECT_SIZE\" to ES_JAVA_OPTS"
+    unsupported_environment_variable "$ES_USE_IPV4" ES_USE_IPV4 "set -Djava.net.preferIPv4Stack=true in jvm.options or add \"-Djava.net.preferIPv4Stack=true\" to ES_JAVA_OPTS"
+    unsupported_environment_variable "$ES_GC_OPTS" ES_GC_OPTS "set ${ES_GC_OPTS// / and } in jvm.options or add \"$ES_GC_OPTS\" to ES_JAVA_OPTS"
+    unsupported_environment_variable "$ES_GC_LOG_FILE" ES_GC_LOG_FILE "set -Xloggc:$ES_GC_LOG_FILE in jvm.options or add \"-Xloggc:$ES_GC_LOG_FILE\" to ES_JAVA_OPTS"
+    exit 1
+fi
+# end TODO: remove for Elasticsearch 6.x
+
+parse_jvm_options() {
+  if [ -f "$1" ]; then
+    echo "$(grep "^-" "$1" | tr '\n' ' ')"
+  fi
+}
+
+CDPATH=""
+SCRIPT="$0"
+
+# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
+while [ -h "$SCRIPT" ] ; do
+  ls=`ls -ld "$SCRIPT"`
+  # Drop everything prior to ->
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    SCRIPT="$link"
+  else
+    SCRIPT=`dirname "$SCRIPT"`/"$link"
+  fi
+done
+
+# determine elasticsearch home
+ES_HOME=`dirname "$SCRIPT"`/..
+
+# make ELASTICSEARCH_HOME absolute
+ES_HOME=`cd "$ES_HOME"; pwd`
+
+if [ -z "$ES_JVM_OPTIONS" ]; then
+    for jvm_options in "$ES_HOME"/config/jvm.options \
+                      /etc/elasticsearch/jvm.options; do
+        if [ -r "$jvm_options" ]; then
+            ES_JVM_OPTIONS=$jvm_options
+            break
+        fi
+    done
+fi
+
+ES_JAVA_OPTS="$(parse_jvm_options "$ES_JVM_OPTIONS") $ES_JAVA_OPTS"
+
+# If an include wasn't specified in the environment, then search for one...
+if [ "x$ES_INCLUDE" = "x" ]; then
+    # Locations (in order) to use when searching for an include file.
+    for include in /usr/share/elasticsearch/elasticsearch.in.sh \
+                   /usr/local/share/elasticsearch/elasticsearch.in.sh \
+                   /opt/elasticsearch/elasticsearch.in.sh \
+                   ~/.elasticsearch.in.sh \
+                   "$ES_HOME/bin/elasticsearch.in.sh" \
+                   "`dirname "$0"`"/elasticsearch.in.sh; do
+        if [ -r "$include" ]; then
+            . "$include"
+            break
+        fi
+    done
+# ...otherwise, source the specified include.
+elif [ -r "$ES_INCLUDE" ]; then
+    . "$ES_INCLUDE"
+fi
+
+if [ -x "$JAVA_HOME/bin/java" ]; then
+    JAVA="$JAVA_HOME/bin/java"
+else
+    JAVA=`which java`
+fi
+
+if [ ! -x "$JAVA" ]; then
+    echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME"
+    exit 1
+fi
+
+if [ -z "$ES_CLASSPATH" ]; then
+    echo "You must set the ES_CLASSPATH var" >&2
+    exit 1
+fi
+
+# don't let JAVA_TOOL_OPTIONS slip in (e.g. crazy agents in ubuntu)
+# works around https://bugs.launchpad.net/ubuntu/+source/jayatana/+bug/1441487
+if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then
+    echo "Warning: Ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
+    echo "Please pass JVM parameters via ES_JAVA_OPTS instead"
+    unset JAVA_TOOL_OPTIONS
+fi
+
+# JAVA_OPTS is not a built-in JVM mechanism but some people think it is
+# so let us warn them that we are not observing the value of $JAVA_OPTS
+if [ "x$JAVA_OPTS" != "x" ]; then
+    echo "Warning: Ignoring JAVA_OPTS=$JAVA_OPTS"
+    echo "Please pass JVM parameters via ES_JAVA_OPTS instead"
+fi
+
+# full hostname passed through cut for portability on systems that do not support hostname -s
+# export on separate line for shells that do not support combining definition and export
+HOSTNAME=`hostname | cut -d. -f1`
+export HOSTNAME
+
+# manual parsing to find out, if process should be detached
+daemonized=`echo $* | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'`
+if [ -z "$daemonized" ] ; then
+    exec "$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" \
+          org.elasticsearch.bootstrap.Elasticsearch "$@"
+else
+    exec "$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" \
+          org.elasticsearch.bootstrap.Elasticsearch "$@" <&- &
+    retval=$?
+    pid=$!
+    [ $retval -eq 0 ] || exit $retval
+    if [ ! -z "$ES_STARTUP_SLEEP_TIME" ]; then
+      sleep $ES_STARTUP_SLEEP_TIME
+    fi
+    if ! ps -p $pid > /dev/null ; then
+      exit 1
+    fi
+    exit 0
+fi
+
+exit $?
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-plugin b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-plugin
new file mode 100755 (executable)
index 0000000..77d83af
--- /dev/null
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+CDPATH=""
+SCRIPT="$0"
+
+# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
+while [ -h "$SCRIPT" ] ; do
+  ls=`ls -ld "$SCRIPT"`
+  # Drop everything prior to ->
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    SCRIPT="$link"
+  else
+    SCRIPT=`dirname "$SCRIPT"`/"$link"
+  fi
+done
+
+# determine elasticsearch home
+ES_HOME=`dirname "$SCRIPT"`/..
+
+# make ELASTICSEARCH_HOME absolute
+ES_HOME=`cd "$ES_HOME"; pwd`
+
+
+# Sets the default values for elasticsearch variables used in this script
+if [ -z "$CONF_DIR" ]; then
+  CONF_DIR="$ES_HOME/config"
+fi
+
+# The default env file is defined at building/packaging time.
+# For a distribution package, the value is "".
+ES_ENV_FILE=""
+
+# If an include is specified with the ES_INCLUDE environment variable, use it
+if [ -n "$ES_INCLUDE" ]; then
+    ES_ENV_FILE="$ES_INCLUDE"
+fi
+
+# Source the environment file
+if [ -n "$ES_ENV_FILE" ]; then
+
+  # If the ES_ENV_FILE is not found, try to resolve the path
+  # against the ES_HOME directory
+  if [ ! -f "$ES_ENV_FILE" ]; then
+      ES_ENV_FILE="$ELASTIC_HOME/$ES_ENV_FILE"
+  fi
+
+  . "$ES_ENV_FILE"
+  if [ $? -ne 0 ]; then
+      echo "Unable to source environment file: $ES_ENV_FILE" >&2
+      exit 1
+  fi
+fi
+
+# don't let JAVA_TOOL_OPTIONS slip in (e.g. crazy agents in ubuntu)
+# works around https://bugs.launchpad.net/ubuntu/+source/jayatana/+bug/1441487
+if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then
+    echo "Warning: Ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
+    unset JAVA_TOOL_OPTIONS
+fi
+
+# CONF_FILE setting was removed
+if [ ! -z "$CONF_FILE" ]; then
+    echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed."
+    exit 1
+fi
+
+if [ -x "$JAVA_HOME/bin/java" ]; then
+    JAVA=$JAVA_HOME/bin/java
+else
+    JAVA=`which java`
+fi
+
+if [ ! -x "$JAVA" ]; then
+    echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME"
+    exit 1
+fi
+
+# full hostname passed through cut for portability on systems that do not support hostname -s
+# export on separate line for shells that do not support combining definition and export
+HOSTNAME=`hostname | cut -d. -f1`
+export HOSTNAME
+
+declare -a args=("$@")
+path_props=(-Des.path.home="$ES_HOME")
+
+if [ -e "$CONF_DIR" ]; then
+  path_props=("${path_props[@]}" -Des.path.conf="$CONF_DIR")
+fi
+
+exec "$JAVA" $ES_JAVA_OPTS -Delasticsearch "${path_props[@]}" -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginCli "${args[@]}"
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-plugin.bat b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-plugin.bat
new file mode 100644 (file)
index 0000000..b2c87d1
--- /dev/null
@@ -0,0 +1,30 @@
+@echo off\r
+\r
+SETLOCAL enabledelayedexpansion\r
+\r
+IF DEFINED JAVA_HOME (\r
+  set JAVA=%JAVA_HOME%\bin\java.exe\r
+) ELSE (\r
+  FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I\r
+)\r
+IF NOT EXIST "%JAVA%" (\r
+  ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2\r
+  EXIT /B 1\r
+)\r
+\r
+set SCRIPT_DIR=%~dp0\r
+for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI\r
+\r
+TITLE Elasticsearch Plugin Manager 5.0.2\r
+\r
+SET path_props=-Des.path.home="%ES_HOME%"\r
+IF DEFINED CONF_DIR (\r
+  SET path_props=!path_props! -Des.path.conf="%CONF_DIR%"\r
+)\r
+\r
+SET args=%*\r
+SET HOSTNAME=%COMPUTERNAME%\r
+\r
+"%JAVA%" %ES_JAVA_OPTS% !path_props! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args!\r
+\r
+ENDLOCAL\r
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-mgr.exe b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-mgr.exe
new file mode 100644 (file)
index 0000000..7302404
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-mgr.exe differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x64.exe b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x64.exe
new file mode 100644 (file)
index 0000000..dab7def
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x64.exe differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x86.exe b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x86.exe
new file mode 100644 (file)
index 0000000..4240720
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service-x86.exe differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service.bat b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-service.bat
new file mode 100644 (file)
index 0000000..9c46c37
--- /dev/null
@@ -0,0 +1,349 @@
+@echo off\r
+SETLOCAL enabledelayedexpansion\r
+\r
+TITLE Elasticsearch Service 5.0.2\r
+\r
+rem TODO: remove for Elasticsearch 6.x\r
+set bad_env_var=0\r
+if not "%ES_MIN_MEM%" == "" set bad_env_var=1\r
+if not "%ES_MAX_MEM%" == "" set bad_env_var=1\r
+if not "%ES_HEAP_SIZE%" == "" set bad_env_var=1\r
+if not "%ES_HEAP_NEWSIZE%" == "" set bad_env_var=1\r
+if not "%ES_DIRECT_SIZE%" == "" set bad_env_var=1\r
+if not "%ES_USE_IPV4%" == "" set bad_env_var=1\r
+if not "%ES_GC_OPTS%" == "" set bad_env_var=1\r
+if not "%ES_GC_LOG_FILE%" == "" set bad_env_var=1\r
+if %bad_env_var% == 1 (\r
+    echo Error: encountered environment variables that are no longer supported\r
+    echo Use jvm.options or ES_JAVA_OPTS to configure the JVM\r
+    if not "%ES_MIN_MEM%" == "" echo ES_MIN_MEM=%ES_MIN_MEM%: set -Xms%ES_MIN_MEM% in jvm.options or add "-Xms%ES_MIN_MEM%" to ES_JAVA_OPTS\r
+    if not "%ES_MAX_MEM%" == "" echo ES_MAX_MEM=%ES_MAX_MEM%: set -Xms%ES_MAX_MEM% in jvm.options or add "-Xmx%ES_MAX_MEM%" to ES_JAVA_OPTS\r
+    if not "%ES_HEAP_SIZE%" == "" echo ES_HEAP_SIZE=%ES_HEAP_SIZE%: set -Xms%ES_HEAP_SIZE% and -Xmx%ES_HEAP_SIZE% in jvm.options or add "-Xms%ES_HEAP_SIZE% -Xmx%ES_HEAP_SIZE%" to ES_JAVA_OPTS\r
+    if not "%ES_HEAP_NEWSIZE%" == "" echo ES_HEAP_NEWSIZE=%ES_HEAP_NEWSIZE%: set -Xmn%ES_HEAP_NEWSIZE% in jvm.options or add "-Xmn%ES_HEAP_SIZE%" to ES_JAVA_OPTS\r
+    if not "%ES_DIRECT_SIZE%" == "" echo ES_DIRECT_SIZE=%ES_DIRECT_SIZE%: set -XX:MaxDirectMemorySize=%ES_DIRECT_SIZE% in jvm.options or add "-XX:MaxDirectMemorySize=%ES_DIRECT_SIZE%" to ES_JAVA_OPTS\r
+    if not "%ES_USE_IPV4%" == "" echo ES_USE_IPV4=%ES_USE_IPV4%: set -Djava.net.preferIPv4Stack=true in jvm.options or add "-Djava.net.preferIPv4Stack=true" to ES_JAVA_OPTS\r
+    if not "%ES_GC_OPTS%" == "" echo ES_GC_OPTS=%ES_GC_OPTS%: set %ES_GC_OPTS: = and % in jvm.options or add "%ES_GC_OPTS%" to ES_JAVA_OPTS\r
+    if not "%ES_GC_LOG_FILE%" == "" echo ES_GC_LOG_FILE=%ES_GC_LOG_FILE%: set -Xloggc:%ES_GC_LOG_FILE% in jvm.options or add "-Xloggc:%ES_GC_LOG_FILE%" to ES_JAVA_OPTS"\r
+    exit /b 1\r
+)\r
+rem end TODO: remove for Elasticsearch 6.x\r
+\r
+IF DEFINED JAVA_HOME (\r
+  SET JAVA=%JAVA_HOME%\bin\java.exe\r
+) ELSE (\r
+  FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I\r
+)\r
+IF NOT EXIST "%JAVA%" (\r
+  ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2\r
+  EXIT /B 1\r
+)\r
+IF DEFINED JAVA_HOME GOTO :cont\r
+\r
+IF NOT "%JAVA:~-13%" == "\bin\java.exe" (\r
+  FOR /f "tokens=2 delims=[]" %%I IN ('dir %JAVA%') DO @set JAVA=%%I\r
+)\r
+IF "%JAVA:~-13%" == "\bin\java.exe" (\r
+  SET JAVA_HOME=%JAVA:~0,-13%\r
+)\r
+\r
+:cont\r
+if not "%CONF_FILE%" == "" goto conffileset\r
+\r
+set SCRIPT_DIR=%~dp0\r
+for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI\r
+\r
+"%JAVA%" -Xmx50M -version > nul 2>&1\r
+\r
+if errorlevel 1 (\r
+       echo Warning: Could not start JVM to detect version, defaulting to x86:\r
+       goto x86\r
+)\r
+\r
+"%JAVA%" -Xmx50M -version 2>&1 | "%windir%\System32\find" "64-Bit" >nul:\r
+\r
+if errorlevel 1 goto x86\r
+set EXECUTABLE=%ES_HOME%\bin\elasticsearch-service-x64.exe\r
+set SERVICE_ID=elasticsearch-service-x64\r
+set ARCH=64-bit\r
+goto checkExe\r
+\r
+:x86\r
+set EXECUTABLE=%ES_HOME%\bin\elasticsearch-service-x86.exe\r
+set SERVICE_ID=elasticsearch-service-x86\r
+set ARCH=32-bit\r
+\r
+:checkExe\r
+if EXIST "%EXECUTABLE%" goto okExe\r
+echo elasticsearch-service-(x86|x64).exe was not found...\r
+\r
+:okExe\r
+set ES_VERSION=5.0.2\r
+\r
+if "%LOG_DIR%" == "" set LOG_DIR=%ES_HOME%\logs\r
+\r
+if "x%1x" == "xx" goto displayUsage\r
+set SERVICE_CMD=%1\r
+shift\r
+if "x%1x" == "xx" goto checkServiceCmd\r
+set SERVICE_ID=%1\r
+\r
+:checkServiceCmd\r
+\r
+if "%LOG_OPTS%" == "" set LOG_OPTS=--LogPath "%LOG_DIR%" --LogPrefix "%SERVICE_ID%" --StdError auto --StdOutput auto\r
+\r
+if /i %SERVICE_CMD% == install goto doInstall\r
+if /i %SERVICE_CMD% == remove goto doRemove\r
+if /i %SERVICE_CMD% == start goto doStart\r
+if /i %SERVICE_CMD% == stop goto doStop\r
+if /i %SERVICE_CMD% == manager goto doManagment\r
+echo Unknown option "%SERVICE_CMD%"\r
+\r
+:displayUsage\r
+echo.\r
+echo Usage: elasticsearch-service.bat install^|remove^|start^|stop^|manager [SERVICE_ID]\r
+goto:eof\r
+\r
+:doStart\r
+"%EXECUTABLE%" //ES//%SERVICE_ID% %LOG_OPTS%\r
+if not errorlevel 1 goto started\r
+echo Failed starting '%SERVICE_ID%' service\r
+goto:eof\r
+:started\r
+echo The service '%SERVICE_ID%' has been started\r
+goto:eof\r
+\r
+:doStop\r
+"%EXECUTABLE%" //SS//%SERVICE_ID% %LOG_OPTS%\r
+if not errorlevel 1 goto stopped\r
+echo Failed stopping '%SERVICE_ID%' service\r
+goto:eof\r
+:stopped\r
+echo The service '%SERVICE_ID%' has been stopped\r
+goto:eof\r
+\r
+:doManagment\r
+set EXECUTABLE_MGR=%ES_HOME%\bin\elasticsearch-service-mgr.exe\r
+"%EXECUTABLE_MGR%" //ES//%SERVICE_ID%\r
+if not errorlevel 1 goto managed\r
+echo Failed starting service manager for '%SERVICE_ID%'\r
+goto:eof\r
+:managed\r
+echo Successfully started service manager for '%SERVICE_ID%'.\r
+goto:eof\r
+\r
+:doRemove\r
+rem Remove the service\r
+"%EXECUTABLE%" //DS//%SERVICE_ID% %LOG_OPTS%\r
+if not errorlevel 1 goto removed\r
+echo Failed removing '%SERVICE_ID%' service\r
+goto:eof\r
+:removed\r
+echo The service '%SERVICE_ID%' has been removed\r
+goto:eof\r
+\r
+:doInstall\r
+echo Installing service      :  "%SERVICE_ID%"\r
+echo Using JAVA_HOME (%ARCH%):  "%JAVA_HOME%"\r
+\r
+rem Check JVM server dll first\r
+if exist "%JAVA_HOME%"\jre\bin\server\jvm.dll (\r
+       set JVM_DLL=\jre\bin\server\jvm.dll\r
+       goto foundJVM\r
+)\r
+\r
+rem Check 'server' JRE (JRE installed on Windows Server)\r
+if exist "%JAVA_HOME%"\bin\server\jvm.dll (\r
+       set JVM_DLL=\bin\server\jvm.dll\r
+       goto foundJVM\r
+)\r
+\r
+rem Fallback to 'client' JRE\r
+if exist "%JAVA_HOME%"\bin\client\jvm.dll (\r
+       set JVM_DLL=\bin\client\jvm.dll\r
+       echo Warning: JAVA_HOME points to a JRE and not JDK installation; a client (not a server^) JVM will be used...\r
+) else (\r
+       echo JAVA_HOME points to an invalid Java installation (no jvm.dll found in "%JAVA_HOME%"^). Exiting...\r
+       goto:eof\r
+)\r
+\r
+:foundJVM\r
+if "%ES_JVM_OPTIONS%" == "" (\r
+set ES_JVM_OPTIONS=%ES_HOME%\config\jvm.options\r
+)\r
+\r
+if not "%ES_JAVA_OPTS%" == "" set ES_JAVA_OPTS=%ES_JAVA_OPTS: =;%\r
+\r
+@setlocal\r
+for /F "usebackq delims=" %%a in (`findstr /b \- "%ES_JVM_OPTIONS%" ^| findstr /b /v "\-server \-client"`) do set JVM_OPTIONS=!JVM_OPTIONS!%%a;\r
+@endlocal & set ES_JAVA_OPTS=%JVM_OPTIONS%%ES_JAVA_OPTS%\r
+\r
+if "%ES_JAVA_OPTS:~-1%"==";" set ES_JAVA_OPTS=%ES_JAVA_OPTS:~0,-1%\r
+\r
+@setlocal EnableDelayedExpansion\r
+for %%a in ("%ES_JAVA_OPTS:;=","%") do (\r
+  set var=%%a\r
+  if "!var:~1,4!" == "-Xms" (\r
+    if not "!JVM_MS!" == "" (\r
+      echo duplicate min heap size settings found\r
+      goto:eof\r
+    )\r
+    set XMS=!var:~5,-1!\r
+    call:convertxm !XMS! JVM_MS\r
+  )\r
+  if "!var:~1,16!" == "-XX:MinHeapSize=" (\r
+    if not "!JVM_MS!" == "" (\r
+      echo duplicate min heap size settings found\r
+      goto:eof\r
+    )\r
+    set XMS=!var:~17,-1!\r
+    call:convertxm !XMS! JVM_MS\r
+  )\r
+  if "!var:~1,4!" == "-Xmx" (\r
+    if not "!JVM_MX!" == "" (\r
+      echo duplicate max heap size settings found\r
+      goto:eof\r
+    )\r
+    set XMX=!var:~5,-1!\r
+    call:convertxm !XMX! JVM_MX\r
+  )\r
+  if "!var:~1,16!" == "-XX:MaxHeapSize=" (\r
+    if not "!JVM_MX!" == "" (\r
+      echo duplicate max heap size settings found\r
+      goto:eof\r
+    )\r
+    set XMX=!var:~17,-1!\r
+    call:convertxm !XMX! JVM_MX\r
+  )\r
+  if "!var:~1,4!" == "-Xss" (\r
+    if not "!JVM_SS!" == "" (\r
+      echo duplicate thread stack size settings found\r
+      exit 1\r
+    )\r
+    set XSS=!var:~5,-1!\r
+    call:convertxk !XSS! JVM_SS\r
+  )\r
+  if "!var:~1,20!" == "-XX:ThreadStackSize=" (\r
+    if not "!JVM_SS!" == "" (\r
+      echo duplicate thread stack size settings found\r
+      goto:eof\r
+    )\r
+    set XSS=!var:~21,-1!\r
+    call:convertxk !XSS! JVM_SS\r
+  )\r
+)\r
+@endlocal & set JVM_MS=%JVM_MS% & set JVM_MX=%JVM_MX% & set JVM_SS=%JVM_SS%\r
+\r
+if "%JVM_MS%" == "" (\r
+  echo minimum heap size not set; configure using -Xms via %ES_JVM_OPTIONS% or ES_JAVA_OPTS\r
+  goto:eof\r
+)\r
+if "%JVM_MX%" == "" (\r
+  echo maximum heap size not set; configure using -Xmx via %ES_JVM_OPTIONS% or ES_JAVA_OPTS\r
+  goto:eof\r
+)\r
+if "%JVM_SS%" == "" (\r
+  echo thread stack size not set; configure using -Xss via %ES_JVM_OPTIONS% or ES_JAVA_OPTS\r
+  goto:eof\r
+)\r
+\r
+CALL "%ES_HOME%\bin\elasticsearch.in.bat"\r
+if "%DATA_DIR%" == "" set DATA_DIR=%ES_HOME%\data\r
+\r
+if "%CONF_DIR%" == "" set CONF_DIR=%ES_HOME%\config\r
+\r
+set ES_PARAMS=-Delasticsearch;-Des.path.home="%ES_HOME%";-Des.default.path.logs="%LOG_DIR%";-Des.default.path.data="%DATA_DIR%";-Des.default.path.conf="%CONF_DIR%"\r
+\r
+if "%ES_START_TYPE%" == "" set ES_START_TYPE=manual\r
+if "%ES_STOP_TIMEOUT%" == "" set ES_STOP_TIMEOUT=0\r
+\r
+if "%SERVICE_DISPLAY_NAME%" == "" set SERVICE_DISPLAY_NAME=Elasticsearch %ES_VERSION% (%SERVICE_ID%)\r
+if "%SERVICE_DESCRIPTION%" == "" set SERVICE_DESCRIPTION=Elasticsearch %ES_VERSION% Windows Service - https://elastic.co\r
+\r
+if not "%SERVICE_USERNAME%" == "" (\r
+       if not "%SERVICE_PASSWORD%" == "" (\r
+               set SERVICE_PARAMS=%SERVICE_PARAMS% --ServiceUser "%SERVICE_USERNAME%" --ServicePassword "%SERVICE_PASSWORD%"\r
+       )\r
+)\r
+\r
+"%EXECUTABLE%" //IS//%SERVICE_ID% --Startup %ES_START_TYPE% --StopTimeout %ES_STOP_TIMEOUT% --StartClass org.elasticsearch.bootstrap.Elasticsearch --StopClass org.elasticsearch.bootstrap.Elasticsearch --StartMethod main --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmMs %JVM_MS% --JvmMx %JVM_MX% --JvmSs %JVM_SS% --JvmOptions %ES_JAVA_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%SERVICE_ID%.pid" --DisplayName "%SERVICE_DISPLAY_NAME%" --Description "%SERVICE_DESCRIPTION%" --Jvm "%%JAVA_HOME%%%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%" %SERVICE_PARAMS%\r
+\r
+if not errorlevel 1 goto installed\r
+echo Failed installing '%SERVICE_ID%' service\r
+goto:eof\r
+\r
+:installed\r
+echo The service '%SERVICE_ID%' has been installed.\r
+goto:eof\r
+\r
+:err\r
+echo JAVA_HOME environment variable must be set!\r
+pause\r
+goto:eof\r
+\r
+rem ---\r
+rem Function for converting Xm[s|x] values into MB which Commons Daemon accepts\r
+rem ---\r
+:convertxm\r
+set value=%~1\r
+rem extract last char (unit)\r
+set unit=%value:~-1%\r
+rem assume the unit is specified\r
+set conv=%value:~0,-1%\r
+\r
+if "%unit%" == "k" goto kilo\r
+if "%unit%" == "K" goto kilo\r
+if "%unit%" == "m" goto mega\r
+if "%unit%" == "M" goto mega\r
+if "%unit%" == "g" goto giga\r
+if "%unit%" == "G" goto giga\r
+\r
+rem no unit found, must be bytes; consider the whole value\r
+set conv=%value%\r
+rem convert to KB\r
+set /a conv=%conv% / 1024\r
+:kilo\r
+rem convert to MB\r
+set /a conv=%conv% / 1024\r
+goto mega\r
+:giga\r
+rem convert to MB\r
+set /a conv=%conv% * 1024\r
+:mega\r
+set "%~2=%conv%"\r
+goto:eof\r
+\r
+:convertxk\r
+set value=%~1\r
+rem extract last char (unit)\r
+set unit=%value:~-1%\r
+rem assume the unit is specified\r
+set conv=%value:~0,-1%\r
+\r
+if "%unit%" == "k" goto kilo\r
+if "%unit%" == "K" goto kilo\r
+if "%unit%" == "m" goto mega\r
+if "%unit%" == "M" goto mega\r
+if "%unit%" == "g" goto giga\r
+if "%unit%" == "G" goto giga\r
+\r
+rem no unit found, must be bytes; consider the whole value\r
+set conv=%value%\r
+rem convert to KB\r
+set /a conv=%conv% / 1024\r
+goto kilo\r
+:mega\r
+rem convert to KB\r
+set /a conv=%conv% * 1024\r
+goto kilo\r
+:giga\r
+rem convert to KB\r
+set /a conv=%conv% * 1024 * 1024\r
+:kilo\r
+set "%~2=%conv%"\r
+goto:eof\r
+\r
+:conffileset\r
+echo CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed.\r
+goto:eof\r
+\r
+ENDLOCAL\r
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-systemd-pre-exec b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-systemd-pre-exec
new file mode 100755 (executable)
index 0000000..5a58775
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# CONF_FILE setting was removed
+if [ ! -z "$CONF_FILE" ]; then
+    echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed."
+    exit 1
+fi
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-translog b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-translog
new file mode 100755 (executable)
index 0000000..c1be808
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+CDPATH=""
+SCRIPT="$0"
+
+# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
+while [ -h "$SCRIPT" ] ; do
+  ls=`ls -ld "$SCRIPT"`
+  # Drop everything prior to ->
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    SCRIPT="$link"
+  else
+    SCRIPT=`dirname "$SCRIPT"`/"$link"
+  fi
+done
+
+# determine elasticsearch home
+ES_HOME=`dirname "$SCRIPT"`/..
+
+# make ELASTICSEARCH_HOME absolute
+ES_HOME=`cd "$ES_HOME"; pwd`
+
+
+# Sets the default values for elasticsearch variables used in this script
+if [ -z "$CONF_DIR" ]; then
+  CONF_DIR="$ES_HOME/config"
+fi
+
+# The default env file is defined at building/packaging time.
+# For a distribution package, the value is "".
+ES_ENV_FILE=""
+
+# If an include is specified with the ES_INCLUDE environment variable, use it
+if [ -n "$ES_INCLUDE" ]; then
+    ES_ENV_FILE="$ES_INCLUDE"
+fi
+
+# Source the environment file
+if [ -n "$ES_ENV_FILE" ]; then
+
+  # If the ES_ENV_FILE is not found, try to resolve the path
+  # against the ES_HOME directory
+  if [ ! -f "$ES_ENV_FILE" ]; then
+      ES_ENV_FILE="$ELASTIC_HOME/$ES_ENV_FILE"
+  fi
+
+  . "$ES_ENV_FILE"
+  if [ $? -ne 0 ]; then
+      echo "Unable to source environment file: $ES_ENV_FILE" >&2
+      exit 1
+  fi
+fi
+
+# don't let JAVA_TOOL_OPTIONS slip in (e.g. crazy agents in ubuntu)
+# works around https://bugs.launchpad.net/ubuntu/+source/jayatana/+bug/1441487
+if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then
+    echo "Warning: Ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
+    unset JAVA_TOOL_OPTIONS
+fi
+
+# CONF_FILE setting was removed
+if [ ! -z "$CONF_FILE" ]; then
+    echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed."
+    exit 1
+fi
+
+if [ -x "$JAVA_HOME/bin/java" ]; then
+    JAVA=$JAVA_HOME/bin/java
+else
+    JAVA=`which java`
+fi
+
+if [ ! -x "$JAVA" ]; then
+    echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME"
+    exit 1
+fi
+
+# full hostname passed through cut for portability on systems that do not support hostname -s
+# export on separate line for shells that do not support combining definition and export
+HOSTNAME=`hostname | cut -d. -f1`
+export HOSTNAME
+
+declare -a args=("$@")
+
+if [ -e "$CONF_DIR" ]; then
+  args=("${args[@]}" -Edefault.path.conf="$CONF_DIR")
+fi
+
+exec "$JAVA" $ES_JAVA_OPTS -Delasticsearch -Des.path.home="$ES_HOME" -cp "$ES_HOME/lib/*" org.elasticsearch.index.translog.TranslogToolCli "${args[@]}"
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-translog.bat b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch-translog.bat
new file mode 100644 (file)
index 0000000..90a0754
--- /dev/null
@@ -0,0 +1,61 @@
+@echo off\r
+\r
+SETLOCAL enabledelayedexpansion\r
+\r
+IF DEFINED JAVA_HOME (\r
+  set JAVA=%JAVA_HOME%\bin\java.exe\r
+) ELSE (\r
+  FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I\r
+)\r
+IF NOT EXIST "%JAVA%" (\r
+  ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2\r
+  EXIT /B 1\r
+)\r
+\r
+set SCRIPT_DIR=%~dp0\r
+for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI\r
+\r
+TITLE Elasticsearch Plugin Manager 5.0.2\r
+\r
+SET properties=\r
+SET args=\r
+\r
+:loop\r
+SET "current=%~1"\r
+SHIFT\r
+IF "x!current!" == "x" GOTO breakloop\r
+\r
+IF "!current:~0,2%!" == "-D" (\r
+    ECHO "!current!" | FINDSTR /C:"=">nul && (\r
+         :: current matches -D*=*\r
+         IF "x!properties!" NEQ "x" (\r
+             SET properties=!properties! "!current!"\r
+         ) ELSE (\r
+             SET properties="!current!"\r
+         )\r
+    ) || (\r
+         :: current matches -D*\r
+         IF "x!properties!" NEQ "x" (\r
+            SET properties=!properties! "!current!=%~1"\r
+         ) ELSE (\r
+            SET properties="!current!=%~1"\r
+         )\r
+         SHIFT\r
+    )\r
+) ELSE (\r
+    :: current matches *\r
+    IF "x!args!" NEQ "x" (\r
+        SET args=!args! "!current!"\r
+    ) ELSE (\r
+        SET args="!current!"\r
+    )\r
+)\r
+\r
+GOTO loop\r
+:breakloop\r
+\r
+SET HOSTNAME=%COMPUTERNAME%\r
+\r
+"%JAVA%" %ES_JAVA_OPTS% -Des.path.home="%ES_HOME%" !properties! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.index.translog.TranslogToolCli" !args!\r
+\r
+ENDLOCAL\r
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.bat b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.bat
new file mode 100644 (file)
index 0000000..c3ce9c8
--- /dev/null
@@ -0,0 +1,84 @@
+@echo off\r
+\r
+SETLOCAL enabledelayedexpansion\r
+TITLE Elasticsearch 5.0.2\r
+\r
+SET params='%*'\r
+\r
+rem TODO: remove for Elasticsearch 6.x\r
+set bad_env_var=0\r
+if not "%ES_MIN_MEM%" == "" set bad_env_var=1\r
+if not "%ES_MAX_MEM%" == "" set bad_env_var=1\r
+if not "%ES_HEAP_SIZE%" == "" set bad_env_var=1\r
+if not "%ES_HEAP_NEWSIZE%" == "" set bad_env_var=1\r
+if not "%ES_DIRECT_SIZE%" == "" set bad_env_var=1\r
+if not "%ES_USE_IPV4%" == "" set bad_env_var=1\r
+if not "%ES_GC_OPTS%" == "" set bad_env_var=1\r
+if not "%ES_GC_LOG_FILE%" == "" set bad_env_var=1\r
+if %bad_env_var% == 1 (\r
+    echo Error: encountered environment variables that are no longer supported\r
+    echo Use jvm.options or ES_JAVA_OPTS to configure the JVM\r
+    if not "%ES_MIN_MEM%" == "" echo ES_MIN_MEM=%ES_MIN_MEM%: set -Xms%ES_MIN_MEM% in jvm.options or add "-Xms%ES_MIN_MEM%" to ES_JAVA_OPTS\r
+    if not "%ES_MAX_MEM%" == "" echo ES_MAX_MEM=%ES_MAX_MEM%: set -Xmx%ES_MAX_MEM% in jvm.options or add "-Xmx%ES_MAX_MEM%" to ES_JAVA_OPTS\r
+    if not "%ES_HEAP_SIZE%" == "" echo ES_HEAP_SIZE=%ES_HEAP_SIZE%: set -Xms%ES_HEAP_SIZE% and -Xmx%ES_HEAP_SIZE% in jvm.options or add "-Xms%ES_HEAP_SIZE% -Xmx%ES_HEAP_SIZE%" to ES_JAVA_OPTS\r
+    if not "%ES_HEAP_NEWSIZE%" == "" echo ES_HEAP_NEWSIZE=%ES_HEAP_NEWSIZE%: set -Xmn%ES_HEAP_NEWSIZE% in jvm.options or add "-Xmn%ES_HEAP_SIZE%" to ES_JAVA_OPTS\r
+    if not "%ES_DIRECT_SIZE%" == "" echo ES_DIRECT_SIZE=%ES_DIRECT_SIZE%: set -XX:MaxDirectMemorySize=%ES_DIRECT_SIZE% in jvm.options or add "-XX:MaxDirectMemorySize=%ES_DIRECT_SIZE%" to ES_JAVA_OPTS\r
+    if not "%ES_USE_IPV4%" == "" echo ES_USE_IPV4=%ES_USE_IPV4%: set -Djava.net.preferIPv4Stack=true in jvm.options or add "-Djava.net.preferIPv4Stack=true" to ES_JAVA_OPTS\r
+    if not "%ES_GC_OPTS%" == "" echo ES_GC_OPTS=%ES_GC_OPTS%: set %ES_GC_OPTS: = and % in jvm.options or add "%ES_GC_OPTS%" to ES_JAVA_OPTS\r
+    if not "%ES_GC_LOG_FILE%" == "" echo ES_GC_LOG_FILE=%ES_GC_LOG_FILE%: set -Xloggc:%ES_GC_LOG_FILE% in jvm.options or add "-Xloggc:%ES_GC_LOG_FILE%" to ES_JAVA_OPTS"\r
+    exit /b 1\r
+)\r
+rem end TODO: remove for Elasticsearch 6.x\r
+\r
+:loop\r
+FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO (\r
+    SET current=%%A\r
+    SET params='%%B'\r
+       SET silent=N\r
+\r
+       IF "!current!" == "-s" (\r
+               SET silent=Y\r
+       )\r
+       IF "!current!" == "--silent" (\r
+               SET silent=Y\r
+       )\r
+\r
+       IF "!silent!" == "Y" (\r
+               SET nopauseonerror=Y\r
+       ) ELSE (\r
+           IF "x!newparams!" NEQ "x" (\r
+               SET newparams=!newparams! !current!\r
+        ) ELSE (\r
+            SET newparams=!current!\r
+        )\r
+       )\r
+\r
+    IF "x!params!" NEQ "x" (\r
+               GOTO loop\r
+       )\r
+)\r
+\r
+SET HOSTNAME=%COMPUTERNAME%\r
+\r
+if "%ES_JVM_OPTIONS%" == "" (\r
+rem '0' is the batch file, '~dp' appends the drive and path\r
+set ES_JVM_OPTIONS=%~dp0\..\config\jvm.options\r
+)\r
+\r
+@setlocal\r
+rem extract the options from the JVM options file %ES_JVM_OPTIONS%\r
+rem such options are the lines beginning with '-', thus "findstr /b"\r
+for /F "usebackq delims=" %%a in (`findstr /b \- "%ES_JVM_OPTIONS%"`) do set JVM_OPTIONS=!JVM_OPTIONS! %%a\r
+@endlocal & set ES_JAVA_OPTS=%JVM_OPTIONS% %ES_JAVA_OPTS%\r
+\r
+CALL "%~dp0elasticsearch.in.bat"\r
+IF ERRORLEVEL 1 (\r
+       IF NOT DEFINED nopauseonerror (\r
+               PAUSE\r
+       )\r
+       EXIT /B %ERRORLEVEL%\r
+)\r
+\r
+"%JAVA%" %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" !newparams!\r
+\r
+ENDLOCAL\r
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.in.bat b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.in.bat
new file mode 100644 (file)
index 0000000..062c09b
--- /dev/null
@@ -0,0 +1,25 @@
+@echo off\r
+\r
+IF DEFINED JAVA_HOME (\r
+  set JAVA=%JAVA_HOME%\bin\java.exe\r
+) ELSE (\r
+  FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I\r
+)\r
+IF NOT EXIST "%JAVA%" (\r
+  ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2\r
+  EXIT /B 1\r
+)\r
+\r
+set SCRIPT_DIR=%~dp0\r
+for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI\r
+\r
+REM check in case a user was using this mechanism\r
+if "%ES_CLASSPATH%" == "" (\r
+set ES_CLASSPATH=!ES_HOME!/lib/elasticsearch-5.0.2.jar;!ES_HOME!/lib/*\r
+) else (\r
+ECHO Error: Don't modify the classpath with ES_CLASSPATH, Best is to add 1>&2\r
+ECHO additional elements via the plugin mechanism, or if code must really be 1>&2\r
+ECHO added to the main classpath, add jars to lib\, unsupported 1>&2\r
+EXIT /B 1\r
+)\r
+set ES_PARAMS=-Delasticsearch -Des.path.home="%ES_HOME%"\r
diff --git a/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.in.sh b/sonar-application/src/main/assembly/elasticsearch/bin/elasticsearch.in.sh
new file mode 100755 (executable)
index 0000000..5a3239e
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# check in case a user was using this mechanism
+if [ "x$ES_CLASSPATH" != "x" ]; then
+    cat >&2 << EOF
+Error: Don't modify the classpath with ES_CLASSPATH. Best is to add
+additional elements via the plugin mechanism, or if code must really be
+added to the main classpath, add jars to lib/ (unsupported).
+EOF
+    exit 1
+fi
+
+ES_CLASSPATH="$ES_HOME/lib/elasticsearch-5.0.2.jar:$ES_HOME/lib/*"
diff --git a/sonar-application/src/main/assembly/elasticsearch/config/elasticsearch.yml b/sonar-application/src/main/assembly/elasticsearch/config/elasticsearch.yml
new file mode 100644 (file)
index 0000000..bca8635
--- /dev/null
@@ -0,0 +1,91 @@
+# ======================== Elasticsearch Configuration =========================
+#
+# NOTE: Elasticsearch comes with reasonable defaults for most settings.
+#       Before you set out to tweak and tune the configuration, make sure you
+#       understand what are you trying to accomplish and the consequences.
+#
+# The primary way of configuring a node is via this file. This template lists
+# the most important settings you may want to configure for a production cluster.
+#
+# Please see the documentation for further information on configuration options:
+# <https://www.elastic.co/guide/en/elasticsearch/reference/5.0/settings.html>
+#
+# ---------------------------------- Cluster -----------------------------------
+#
+# Use a descriptive name for your cluster:
+#
+#cluster.name: my-application
+#
+# ------------------------------------ Node ------------------------------------
+#
+# Use a descriptive name for the node:
+#
+#node.name: node-1
+#
+# Add custom attributes to the node:
+#
+#node.attr.rack: r1
+#
+# ----------------------------------- Paths ------------------------------------
+#
+# Path to directory where to store the data (separate multiple locations by comma):
+#
+#path.data: /path/to/data
+#
+# Path to log files:
+#
+#path.logs: /path/to/logs
+#
+# ----------------------------------- Memory -----------------------------------
+#
+# Lock the memory on startup:
+#
+#bootstrap.memory_lock: true
+#
+# Make sure that the heap size is set to about half the memory available
+# on the system and that the owner of the process is allowed to use this
+# limit.
+#
+# Elasticsearch performs poorly when the system is swapping the memory.
+#
+# ---------------------------------- Network -----------------------------------
+#
+# Set the bind address to a specific IP (IPv4 or IPv6):
+#
+#network.host: 192.168.0.1
+#
+# Set a custom port for HTTP:
+#
+#http.port: 9200
+#
+# For more information, see the documentation at:
+# <https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-network.html>
+#
+# --------------------------------- Discovery ----------------------------------
+#
+# Pass an initial list of hosts to perform discovery when new node is started:
+# The default list of hosts is ["127.0.0.1", "[::1]"]
+#
+#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
+#
+# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
+#
+#discovery.zen.minimum_master_nodes: 3
+#
+# For more information, see the documentation at:
+# <https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-discovery-zen.html>
+#
+# ---------------------------------- Gateway -----------------------------------
+#
+# Block initial recovery after a full cluster restart until N nodes are started:
+#
+#gateway.recover_after_nodes: 3
+#
+# For more information, see the documentation at:
+# <https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-gateway.html>
+#
+# ---------------------------------- Various -----------------------------------
+#
+# Require explicit names when deleting indices:
+#
+#action.destructive_requires_name: true
diff --git a/sonar-application/src/main/assembly/elasticsearch/config/jvm.options b/sonar-application/src/main/assembly/elasticsearch/config/jvm.options
new file mode 100644 (file)
index 0000000..be2b6ab
--- /dev/null
@@ -0,0 +1,103 @@
+## JVM configuration
+
+################################################################
+## IMPORTANT: JVM heap size
+################################################################
+##
+## You should always set the min and max JVM heap
+## size to the same value. For example, to set
+## the heap to 4 GB, set:
+##
+## -Xms4g
+## -Xmx4g
+##
+## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
+## for more information
+##
+################################################################
+
+# Xms represents the initial size of total heap space
+# Xmx represents the maximum size of total heap space
+
+-Xms2g
+-Xmx2g
+
+################################################################
+## Expert settings
+################################################################
+##
+## All settings below this section are considered
+## expert settings. Don't tamper with them unless
+## you understand what you are doing
+##
+################################################################
+
+## GC configuration
+-XX:+UseConcMarkSweepGC
+-XX:CMSInitiatingOccupancyFraction=75
+-XX:+UseCMSInitiatingOccupancyOnly
+
+## optimizations
+
+# disable calls to System#gc
+-XX:+DisableExplicitGC
+
+# pre-touch memory pages used by the JVM during initialization
+-XX:+AlwaysPreTouch
+
+## basic
+
+# force the server VM
+-server
+
+# set to headless, just in case
+-Djava.awt.headless=true
+
+# ensure UTF-8 encoding by default (e.g. filenames)
+-Dfile.encoding=UTF-8
+
+# use our provided JNA always versus the system one
+-Djna.nosys=true
+
+# use old-style file permissions on JDK9
+-Djdk.io.permissionsUseCanonicalPath=true
+
+# flags to keep Netty from being unsafe
+-Dio.netty.noUnsafe=true
+-Dio.netty.noKeySetOptimization=true
+
+# log4j 2
+-Dlog4j.shutdownHookEnabled=false
+-Dlog4j2.disable.jmx=true
+-Dlog4j.skipJansi=true
+
+## heap dumps
+
+# generate a heap dump when an allocation from the Java heap fails
+# heap dumps are created in the working directory of the JVM
+-XX:+HeapDumpOnOutOfMemoryError
+
+# specify an alternative path for heap dumps
+# ensure the directory exists and has sufficient space
+#-XX:HeapDumpPath=${heap.dump.path}
+
+## GC logging
+
+#-XX:+PrintGCDetails
+#-XX:+PrintGCTimeStamps
+#-XX:+PrintGCDateStamps
+#-XX:+PrintClassHistogram
+#-XX:+PrintTenuringDistribution
+#-XX:+PrintGCApplicationStoppedTime
+
+# log GC status to a file with time stamps
+# ensure the directory exists
+#-Xloggc:${loggc}
+
+# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON.
+# If documents were already indexed with unquoted fields in a previous version
+# of Elasticsearch, some operations may throw errors.
+#
+# WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided
+# only for migration purposes.
+#-Delasticsearch.json.allow_unquoted_field_names=true
diff --git a/sonar-application/src/main/assembly/elasticsearch/config/log4j2.properties b/sonar-application/src/main/assembly/elasticsearch/config/log4j2.properties
new file mode 100644 (file)
index 0000000..3702aff
--- /dev/null
@@ -0,0 +1,74 @@
+status = error
+
+# log action execution errors for easier debugging
+logger.action.name = org.elasticsearch.action
+logger.action.level = debug
+
+appender.console.type = Console
+appender.console.name = console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
+
+appender.rolling.type = RollingFile
+appender.rolling.name = rolling
+appender.rolling.fileName = ${sys:es.logs}.log
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
+appender.rolling.filePattern = ${sys:es.logs}-%d{yyyy-MM-dd}.log
+appender.rolling.policies.type = Policies
+appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
+appender.rolling.policies.time.interval = 1
+appender.rolling.policies.time.modulate = true
+
+rootLogger.level = info
+rootLogger.appenderRef.console.ref = console
+rootLogger.appenderRef.rolling.ref = rolling
+
+appender.deprecation_rolling.type = RollingFile
+appender.deprecation_rolling.name = deprecation_rolling
+appender.deprecation_rolling.fileName = ${sys:es.logs}_deprecation.log
+appender.deprecation_rolling.layout.type = PatternLayout
+appender.deprecation_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
+appender.deprecation_rolling.filePattern = ${sys:es.logs}_deprecation-%i.log.gz
+appender.deprecation_rolling.policies.type = Policies
+appender.deprecation_rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.deprecation_rolling.policies.size.size = 1GB
+appender.deprecation_rolling.strategy.type = DefaultRolloverStrategy
+appender.deprecation_rolling.strategy.max = 4
+
+logger.deprecation.name = org.elasticsearch.deprecation
+logger.deprecation.level = warn
+logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
+logger.deprecation.additivity = false
+
+appender.index_search_slowlog_rolling.type = RollingFile
+appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
+appender.index_search_slowlog_rolling.fileName = ${sys:es.logs}_index_search_slowlog.log
+appender.index_search_slowlog_rolling.layout.type = PatternLayout
+appender.index_search_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
+appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs}_index_search_slowlog-%d{yyyy-MM-dd}.log
+appender.index_search_slowlog_rolling.policies.type = Policies
+appender.index_search_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
+appender.index_search_slowlog_rolling.policies.time.interval = 1
+appender.index_search_slowlog_rolling.policies.time.modulate = true
+
+logger.index_search_slowlog_rolling.name = index.search.slowlog
+logger.index_search_slowlog_rolling.level = trace
+logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
+logger.index_search_slowlog_rolling.additivity = false
+
+appender.index_indexing_slowlog_rolling.type = RollingFile
+appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
+appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs}_index_indexing_slowlog.log
+appender.index_indexing_slowlog_rolling.layout.type = PatternLayout
+appender.index_indexing_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
+appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs}_index_indexing_slowlog-%d{yyyy-MM-dd}.log
+appender.index_indexing_slowlog_rolling.policies.type = Policies
+appender.index_indexing_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
+appender.index_indexing_slowlog_rolling.policies.time.interval = 1
+appender.index_indexing_slowlog_rolling.policies.time.modulate = true
+
+logger.index_indexing_slowlog.name = index.indexing.slowlog.index
+logger.index_indexing_slowlog.level = trace
+logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling
+logger.index_indexing_slowlog.additivity = false
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/HdrHistogram-2.1.6.jar b/sonar-application/src/main/assembly/elasticsearch/lib/HdrHistogram-2.1.6.jar
new file mode 100644 (file)
index 0000000..04eb380
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/HdrHistogram-2.1.6.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/elasticsearch-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/lib/elasticsearch-5.0.2.jar
new file mode 100644 (file)
index 0000000..2d345a0
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/elasticsearch-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/hppc-0.7.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/hppc-0.7.1.jar
new file mode 100644 (file)
index 0000000..ed318de
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/hppc-0.7.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/jackson-core-2.8.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-core-2.8.1.jar
new file mode 100644 (file)
index 0000000..29230d4
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-core-2.8.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-cbor-2.8.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-cbor-2.8.1.jar
new file mode 100644 (file)
index 0000000..b69dca6
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-cbor-2.8.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-smile-2.8.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-smile-2.8.1.jar
new file mode 100644 (file)
index 0000000..9096d95
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-smile-2.8.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-yaml-2.8.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-yaml-2.8.1.jar
new file mode 100644 (file)
index 0000000..01c0bce
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/jackson-dataformat-yaml-2.8.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/jna-4.2.2.jar b/sonar-application/src/main/assembly/elasticsearch/lib/jna-4.2.2.jar
new file mode 100644 (file)
index 0000000..a943670
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/jna-4.2.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/joda-time-2.9.5.jar b/sonar-application/src/main/assembly/elasticsearch/lib/joda-time-2.9.5.jar
new file mode 100644 (file)
index 0000000..2567cbd
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/joda-time-2.9.5.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/jopt-simple-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/lib/jopt-simple-5.0.2.jar
new file mode 100644 (file)
index 0000000..2c7a087
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/jopt-simple-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/jts-1.13.jar b/sonar-application/src/main/assembly/elasticsearch/lib/jts-1.13.jar
new file mode 100644 (file)
index 0000000..bbaa20b
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/jts-1.13.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/log4j-1.2-api-2.6.2.jar b/sonar-application/src/main/assembly/elasticsearch/lib/log4j-1.2-api-2.6.2.jar
new file mode 100644 (file)
index 0000000..0615df7
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/log4j-1.2-api-2.6.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/log4j-api-2.6.2.jar b/sonar-application/src/main/assembly/elasticsearch/lib/log4j-api-2.6.2.jar
new file mode 100644 (file)
index 0000000..a40cc56
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/log4j-api-2.6.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/log4j-core-2.6.2.jar b/sonar-application/src/main/assembly/elasticsearch/lib/log4j-core-2.6.2.jar
new file mode 100644 (file)
index 0000000..388918f
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/log4j-core-2.6.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-analyzers-common-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-analyzers-common-6.2.1.jar
new file mode 100644 (file)
index 0000000..52df2a7
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-analyzers-common-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-backward-codecs-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-backward-codecs-6.2.1.jar
new file mode 100644 (file)
index 0000000..30cf3b9
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-backward-codecs-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-core-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-core-6.2.1.jar
new file mode 100644 (file)
index 0000000..e557e1b
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-core-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-grouping-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-grouping-6.2.1.jar
new file mode 100644 (file)
index 0000000..551492d
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-grouping-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-highlighter-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-highlighter-6.2.1.jar
new file mode 100644 (file)
index 0000000..b9d8041
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-highlighter-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-join-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-join-6.2.1.jar
new file mode 100644 (file)
index 0000000..d584395
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-join-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-memory-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-memory-6.2.1.jar
new file mode 100644 (file)
index 0000000..0113165
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-memory-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-misc-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-misc-6.2.1.jar
new file mode 100644 (file)
index 0000000..845cf8b
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-misc-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-queries-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-queries-6.2.1.jar
new file mode 100644 (file)
index 0000000..be78764
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-queries-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-queryparser-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-queryparser-6.2.1.jar
new file mode 100644 (file)
index 0000000..961c509
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-queryparser-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-sandbox-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-sandbox-6.2.1.jar
new file mode 100644 (file)
index 0000000..4448ca1
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-sandbox-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-6.2.1.jar
new file mode 100644 (file)
index 0000000..f8ae65b
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-extras-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-extras-6.2.1.jar
new file mode 100644 (file)
index 0000000..f6f12dc
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial-extras-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial3d-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial3d-6.2.1.jar
new file mode 100644 (file)
index 0000000..d8da9db
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-spatial3d-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/lucene-suggest-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-suggest-6.2.1.jar
new file mode 100644 (file)
index 0000000..a49c732
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/lucene-suggest-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/securesm-1.1.jar b/sonar-application/src/main/assembly/elasticsearch/lib/securesm-1.1.jar
new file mode 100644 (file)
index 0000000..3e38947
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/securesm-1.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/snakeyaml-1.15.jar b/sonar-application/src/main/assembly/elasticsearch/lib/snakeyaml-1.15.jar
new file mode 100644 (file)
index 0000000..34084e3
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/snakeyaml-1.15.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/spatial4j-0.6.jar b/sonar-application/src/main/assembly/elasticsearch/lib/spatial4j-0.6.jar
new file mode 100644 (file)
index 0000000..1afa507
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/spatial4j-0.6.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/lib/t-digest-3.0.jar b/sonar-application/src/main/assembly/elasticsearch/lib/t-digest-3.0.jar
new file mode 100644 (file)
index 0000000..cfb29bc
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/lib/t-digest-3.0.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/aggs-matrix-stats/aggs-matrix-stats-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/aggs-matrix-stats/aggs-matrix-stats-5.0.2.jar
new file mode 100644 (file)
index 0000000..15e282b
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/aggs-matrix-stats/aggs-matrix-stats-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/aggs-matrix-stats/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/aggs-matrix-stats/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..9d14ee2
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Adds aggregations whose input are a list of numeric fields and output includes a matrix.
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=aggs-matrix-stats
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.search.aggregations.matrix.MatrixAggregationPlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/ingest-common-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/ingest-common-5.0.2.jar
new file mode 100644 (file)
index 0000000..7a8d3ce
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/ingest-common-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/jcodings-1.0.12.jar b/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/jcodings-1.0.12.jar
new file mode 100644 (file)
index 0000000..5493b50
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/jcodings-1.0.12.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/joni-2.1.6.jar b/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/joni-2.1.6.jar
new file mode 100644 (file)
index 0000000..7ec4d15
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/joni-2.1.6.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/ingest-common/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..b634de8
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Module for ingest processors that do not require additional security permissions or have large dependencies and resources
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=ingest-common
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.ingest.common.IngestCommonPlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/antlr4-runtime-4.5.1-1.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/antlr4-runtime-4.5.1-1.jar
new file mode 100644 (file)
index 0000000..387129d
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/antlr4-runtime-4.5.1-1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-5.0.4.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-5.0.4.jar
new file mode 100644 (file)
index 0000000..cdb283d
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-5.0.4.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-commons-5.0.4.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-commons-5.0.4.jar
new file mode 100644 (file)
index 0000000..e89265f
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-commons-5.0.4.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-tree-5.0.4.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-tree-5.0.4.jar
new file mode 100644 (file)
index 0000000..ac68a32
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/asm-tree-5.0.4.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lang-expression-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lang-expression-5.0.2.jar
new file mode 100644 (file)
index 0000000..722a258
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lang-expression-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lucene-expressions-6.2.1.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lucene-expressions-6.2.1.jar
new file mode 100644 (file)
index 0000000..33ffc2d
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/lucene-expressions-6.2.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..354818f
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Lucene expressions integration for Elasticsearch
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=lang-expression
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.script.expression.ExpressionPlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/plugin-security.policy b/sonar-application/src/main/assembly/elasticsearch/modules/lang-expression/plugin-security.policy
new file mode 100644 (file)
index 0000000..c11af51
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+grant {
+  // needed to generate runtime classes
+  permission java.lang.RuntimePermission "createClassLoader";
+  
+  // expression runtime
+  permission org.elasticsearch.script.ClassPermission "java.lang.String";
+  permission org.elasticsearch.script.ClassPermission "org.apache.lucene.expressions.Expression";
+  permission org.elasticsearch.script.ClassPermission "org.apache.lucene.queries.function.FunctionValues";
+  // available functions
+  permission org.elasticsearch.script.ClassPermission "java.lang.Math";
+  permission org.elasticsearch.script.ClassPermission "org.apache.lucene.util.MathUtil";
+  permission org.elasticsearch.script.ClassPermission "org.apache.lucene.util.SloppyMath";
+};
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/groovy-2.4.6-indy.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/groovy-2.4.6-indy.jar
new file mode 100644 (file)
index 0000000..ce3531e
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/groovy-2.4.6-indy.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/lang-groovy-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/lang-groovy-5.0.2.jar
new file mode 100644 (file)
index 0000000..f1009e8
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/lang-groovy-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..7360511
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Groovy scripting integration for Elasticsearch
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=lang-groovy
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.script.groovy.GroovyPlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/plugin-security.policy b/sonar-application/src/main/assembly/elasticsearch/modules/lang-groovy/plugin-security.policy
new file mode 100644 (file)
index 0000000..13d00d6
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+grant {
+  // needed to generate runtime classes
+  permission java.lang.RuntimePermission "createClassLoader";
+  // needed by IndyInterface
+  permission java.lang.RuntimePermission "getClassLoader";
+  // needed by groovy engine
+  permission java.lang.RuntimePermission "accessDeclaredMembers";
+  permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
+  permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.reflect";
+  // Allow executing groovy scripts with codesource of /untrusted
+  permission groovy.security.GroovyCodeSourcePermission "/untrusted";
+
+  // Standard set of classes
+  permission org.elasticsearch.script.ClassPermission "<<STANDARD>>";
+  // groovy runtime (TODO: clean these up if possible)
+  permission org.elasticsearch.script.ClassPermission "groovy.grape.GrabAnnotationTransformation";
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.Binding";
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.GroovyObject";
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.GString";
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.Script";
+  permission org.elasticsearch.script.ClassPermission "groovy.util.GroovyCollections";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.ast.builder.AstBuilderTransformation";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.reflection.ClassInfo";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.GStringImpl";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.powerassert.ValueRecorder";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.powerassert.AssertionRenderer";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.ScriptBytecodeAdapter";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.vmplugin.v7.IndyInterface";
+  permission org.elasticsearch.script.ClassPermission "sun.reflect.ConstructorAccessorImpl";
+  permission org.elasticsearch.script.ClassPermission "sun.reflect.MethodAccessorImpl";
+  permission org.elasticsearch.script.ClassPermission "jdk.internal.reflect.ConstructorAccessorImpl";
+  permission org.elasticsearch.script.ClassPermission "jdk.internal.reflect.MethodAccessorImpl";
+
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.Closure";
+  permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.GeneratedClosure";
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.MetaClass";
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.Range";
+  permission org.elasticsearch.script.ClassPermission "groovy.lang.Reference";
+};
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/compiler-0.9.3.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/compiler-0.9.3.jar
new file mode 100644 (file)
index 0000000..60cae63
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/compiler-0.9.3.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/lang-mustache-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/lang-mustache-5.0.2.jar
new file mode 100644 (file)
index 0000000..e558089
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/lang-mustache-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..ddb10bd
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Mustache scripting integration for Elasticsearch
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=lang-mustache
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.script.mustache.MustachePlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/plugin-security.policy b/sonar-application/src/main/assembly/elasticsearch/modules/lang-mustache/plugin-security.policy
new file mode 100644 (file)
index 0000000..ea2db55
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+grant {
+  // needed to do crazy reflection
+  permission java.lang.RuntimePermission "accessDeclaredMembers";
+};
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/antlr4-runtime-4.5.1-1.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/antlr4-runtime-4.5.1-1.jar
new file mode 100644 (file)
index 0000000..387129d
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/antlr4-runtime-4.5.1-1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/asm-debug-all-5.1.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/asm-debug-all-5.1.jar
new file mode 100644 (file)
index 0000000..34b7bfa
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/asm-debug-all-5.1.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/lang-painless-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/lang-painless-5.0.2.jar
new file mode 100644 (file)
index 0000000..82c75b0
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/lang-painless-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..528e409
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=An easy, safe and fast scripting language for Elasticsearch
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=lang-painless
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.painless.PainlessPlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/plugin-security.policy b/sonar-application/src/main/assembly/elasticsearch/modules/lang-painless/plugin-security.policy
new file mode 100644 (file)
index 0000000..e45c1b8
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+grant {
+  // needed to generate runtime classes
+  permission java.lang.RuntimePermission "createClassLoader";
+};
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/percolator/percolator-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/percolator/percolator-5.0.2.jar
new file mode 100644 (file)
index 0000000..5333ccb
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/percolator/percolator-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/percolator/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/percolator/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..d09cad0
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Percolator module adds capability to index queries and query these queries by specifying documents
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=percolator
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.percolator.PercolatorPlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-codec-1.10.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-codec-1.10.jar
new file mode 100644 (file)
index 0000000..1d7417c
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-codec-1.10.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-logging-1.1.3.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-logging-1.1.3.jar
new file mode 100644 (file)
index 0000000..ab51254
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/commons-logging-1.1.3.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpasyncclient-4.1.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpasyncclient-4.1.2.jar
new file mode 100644 (file)
index 0000000..20a8a5a
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpasyncclient-4.1.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpclient-4.5.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpclient-4.5.2.jar
new file mode 100644 (file)
index 0000000..701609f
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpclient-4.5.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-4.4.5.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-4.4.5.jar
new file mode 100644 (file)
index 0000000..6bbf0ac
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-4.4.5.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-nio-4.4.5.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-nio-4.4.5.jar
new file mode 100644 (file)
index 0000000..1845286
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/httpcore-nio-4.4.5.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..25e7c9e
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=The Reindex module adds APIs to reindex from one index to another or update documents in place.
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=reindex
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.index.reindex.ReindexPlugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/reindex-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/reindex-5.0.2.jar
new file mode 100644 (file)
index 0000000..8719236
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/reindex-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/reindex/rest-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/rest-5.0.2.jar
new file mode 100644 (file)
index 0000000..71690e1
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/reindex/rest-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/netty-3.10.6.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/netty-3.10.6.Final.jar
new file mode 100644 (file)
index 0000000..b0a1bda
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/netty-3.10.6.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..ae8baa4
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Netty 3 based transport implementation
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=transport-netty3
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.transport.Netty3Plugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/plugin-security.policy b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/plugin-security.policy
new file mode 100644 (file)
index 0000000..45c8cd9
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+grant {
+   // Netty SelectorUtil wants to change this, because of https://bugs.openjdk.java.net/browse/JDK-6427854
+   // the bug says it only happened rarely, and that its fixed, but apparently it still happens rarely!
+   permission java.util.PropertyPermission "sun.nio.ch.bugLevel", "write";
+};
\ No newline at end of file
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/transport-netty3-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/transport-netty3-5.0.2.jar
new file mode 100644 (file)
index 0000000..cd74441
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty3/transport-netty3-5.0.2.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-buffer-4.1.5.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-buffer-4.1.5.Final.jar
new file mode 100644 (file)
index 0000000..0631d79
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-buffer-4.1.5.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-4.1.5.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-4.1.5.Final.jar
new file mode 100644 (file)
index 0000000..8796fea
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-4.1.5.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-http-4.1.5.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-http-4.1.5.Final.jar
new file mode 100644 (file)
index 0000000..98a9b88
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-codec-http-4.1.5.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-common-4.1.5.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-common-4.1.5.Final.jar
new file mode 100644 (file)
index 0000000..85a5b03
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-common-4.1.5.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-handler-4.1.5.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-handler-4.1.5.Final.jar
new file mode 100644 (file)
index 0000000..85760a6
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-handler-4.1.5.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-resolver-4.1.5.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-resolver-4.1.5.Final.jar
new file mode 100644 (file)
index 0000000..6eeb620
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-resolver-4.1.5.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-transport-4.1.5.Final.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-transport-4.1.5.Final.jar
new file mode 100644 (file)
index 0000000..a76785a
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/netty-transport-4.1.5.Final.jar differ
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/plugin-descriptor.properties b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/plugin-descriptor.properties
new file mode 100644 (file)
index 0000000..e3d1ee1
--- /dev/null
@@ -0,0 +1,40 @@
+# Elasticsearch plugin descriptor file
+# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
+# inside all plugins.
+#
+### example plugin for "foo"
+#
+# foo.zip <-- zip file for the plugin, with this structure:
+#|____elasticsearch/
+#| |____   <arbitrary name1>.jar <-- classes, resources, dependencies
+#| |____   <arbitrary nameN>.jar <-- any number of jars
+#| |____   plugin-descriptor.properties <-- example contents below:
+#
+# classname=foo.bar.BazPlugin
+# description=My cool plugin
+# version=2.0
+# elasticsearch.version=2.0
+# java.version=1.7
+#
+### mandatory elements for all plugins:
+#
+# 'description': simple summary of the plugin
+description=Netty 4 based transport implementation
+#
+# 'version': plugin's version
+version=5.0.2
+#
+# 'name': the plugin name
+name=transport-netty4
+#
+# 'classname': the name of the class to load, fully-qualified.
+classname=org.elasticsearch.transport.Netty4Plugin
+#
+# 'java.version' version of java the code is built against
+# use the system property java.specification.version
+# version string must be a sequence of nonnegative decimal integers
+# separated by "."'s and may have leading zeros
+java.version=1.8
+#
+# 'elasticsearch.version' version of elasticsearch compiled against
+elasticsearch.version=5.0.2
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/plugin-security.policy b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/plugin-security.policy
new file mode 100644 (file)
index 0000000..a8cd1a7
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+grant codeBase "${codebase.netty-transport-4.1.5.Final.jar}" {
+   // Netty NioEventLoop wants to change this, because of https://bugs.openjdk.java.net/browse/JDK-6427854
+   // the bug says it only happened rarely, and that its fixed, but apparently it still happens rarely!
+   permission java.util.PropertyPermission "sun.nio.ch.bugLevel", "write";
+};
\ No newline at end of file
diff --git a/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/transport-netty4-5.0.2.jar b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/transport-netty4-5.0.2.jar
new file mode 100644 (file)
index 0000000..9b21118
Binary files /dev/null and b/sonar-application/src/main/assembly/elasticsearch/modules/transport-netty4/transport-netty4-5.0.2.jar differ