Przeglądaj źródła

SONAR-12686 replace deprecated setting transport.tcp.port by transport.port

tags/8.6.0.39681
Sébastien Lesaint 4 lat temu
rodzic
commit
6390f55dcf

+ 1
- 1
server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java Wyświetl plik

@@ -145,7 +145,7 @@ public class CommandFactoryImpl implements CommandFactory {
.setEsYmlSettings(new EsYmlSettings(settingsMap))
.setClusterName(settingsMap.get("cluster.name"))
.setHost(settingsMap.get("network.host"))
.setPort(Integer.parseInt(settingsMap.get("transport.tcp.port")));
.setPort(Integer.parseInt(settingsMap.get("transport.port")));
return esInstallation;
}


+ 3
- 1
server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java Wyświetl plik

@@ -91,7 +91,9 @@ public class EsSettings {
int port = Integer.parseInt(props.nonNullValue(SEARCH_PORT.getKey()));
LOGGER.info("Elasticsearch listening on {}:{}", host, port);

builder.put("transport.tcp.port", valueOf(port));
// FIXME no need to open TCP port unless running DCE
// TCP is used by main process to check ES is up => probably has to use HTTP now
builder.put("transport.port", valueOf(port));
builder.put("transport.host", valueOf(host.getHostAddress()));
builder.put("network.host", valueOf(host.getHostAddress()));


+ 1
- 1
server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java Wyświetl plik

@@ -138,7 +138,7 @@ public class EsSettingsTest {
EsSettings esSettings = new EsSettings(props, new EsInstallation(props), system);

Map<String, String> generated = esSettings.build();
assertThat(generated.get("transport.tcp.port")).isEqualTo("1234");
assertThat(generated.get("transport.port")).isEqualTo("1234");
assertThat(generated.get("transport.host")).isEqualTo("127.0.0.1");

// no cluster, but cluster and node names are set though

Ładowanie…
Anuluj
Zapisz