use of org.sonar.application.es.EsSettings in project sonarqube by SonarSource.
the class CommandFactoryImpl method createEsInstallation.
private EsInstallation createEsInstallation() {
EsInstallation esInstallation = new EsInstallation(props);
if (!esInstallation.getExecutable().exists()) {
throw new IllegalStateException("Cannot find elasticsearch binary");
}
Map<String, String> settingsMap = new EsSettings(props, esInstallation, System2.INSTANCE).build();
esInstallation.setLog4j2Properties(new EsLogging().createProperties(props, esInstallation.getLogDirectory())).setEsJvmOptions(new EsJvmOptions(props, tempDir).addFromMandatoryProperty(props, SEARCH_JAVA_OPTS.getKey()).addFromMandatoryProperty(props, SEARCH_JAVA_ADDITIONAL_OPTS.getKey())).setEsYmlSettings(new EsYmlSettings(settingsMap)).setHost(settingsMap.get("http.host")).setHttpPort(Integer.parseInt(settingsMap.get("http.port")));
return esInstallation;
}
Aggregations