Search in sources :

Example 1 with EsYmlSettings

use of org.sonar.application.es.EsYmlSettings 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;
}
Also used : EsInstallation(org.sonar.application.es.EsInstallation) EsSettings(org.sonar.application.es.EsSettings) EsLogging(org.sonar.application.es.EsLogging) EsYmlSettings(org.sonar.application.es.EsYmlSettings)

Aggregations

EsInstallation (org.sonar.application.es.EsInstallation)1 EsLogging (org.sonar.application.es.EsLogging)1 EsSettings (org.sonar.application.es.EsSettings)1 EsYmlSettings (org.sonar.application.es.EsYmlSettings)1