diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2018-05-07 11:00:16 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-05-10 20:20:55 +0200 |
commit | 75c553337901c4e09aa53f07f1659d8608ad5181 (patch) | |
tree | 6b6821e5f111d8a1b78c7300e92fee4b7bc1a2d1 /server/sonar-process/src | |
parent | 84b64e035a93260c95d5773cb247d4744c9a50ea (diff) | |
download | sonarqube-75c553337901c4e09aa53f07f1659d8608ad5181.tar.gz sonarqube-75c553337901c4e09aa53f07f1659d8608ad5181.zip |
SONAR-10604 property sonar.cluster.hosts is only for app nodes
Diffstat (limited to 'server/sonar-process/src')
3 files changed, 7 insertions, 7 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java index b4d76fa889d..55a3bb7304a 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java @@ -84,8 +84,8 @@ public class ProcessProperties { CLUSTER_ENABLED("sonar.cluster.enabled", "false"), CLUSTER_NODE_TYPE("sonar.cluster.node.type"), CLUSTER_SEARCH_HOSTS("sonar.cluster.search.hosts"), - CLUSTER_HOSTS("sonar.cluster.hosts"), - CLUSTER_NODE_PORT("sonar.cluster.node.port", "9003"), + CLUSTER_HZ_HOSTS("sonar.cluster.hosts"), + CLUSTER_NODE_HZ_PORT("sonar.cluster.node.port", "9003"), CLUSTER_NODE_HOST("sonar.cluster.node.host"), CLUSTER_NODE_NAME("sonar.cluster.node.name", "sonarqube-" + UUID.randomUUID().toString()), CLUSTER_NAME("sonar.cluster.name", "sonarqube"), diff --git a/server/sonar-process/src/main/java/org/sonar/process/cluster/hz/HazelcastMemberBuilder.java b/server/sonar-process/src/main/java/org/sonar/process/cluster/hz/HazelcastMemberBuilder.java index 338cc6ad1f1..ac62551c4e7 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/cluster/hz/HazelcastMemberBuilder.java +++ b/server/sonar-process/src/main/java/org/sonar/process/cluster/hz/HazelcastMemberBuilder.java @@ -35,7 +35,7 @@ import org.sonar.process.cluster.hz.HazelcastMember.Attribute; import static java.lang.String.format; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; -import static org.sonar.process.ProcessProperties.Property.CLUSTER_NODE_PORT; +import static org.sonar.process.ProcessProperties.Property.CLUSTER_NODE_HZ_PORT; public class HazelcastMemberBuilder { @@ -79,7 +79,7 @@ public class HazelcastMemberBuilder { */ public HazelcastMemberBuilder setMembers(Collection<String> c) { this.members = c.stream() - .map(host -> host.contains(":") ? host : format("%s:%s", host, CLUSTER_NODE_PORT.getDefaultValue())) + .map(host -> host.contains(":") ? host : format("%s:%s", host, CLUSTER_NODE_HZ_PORT.getDefaultValue())) .collect(Collectors.toList()); return this; } diff --git a/server/sonar-process/src/test/java/org/sonar/process/cluster/hz/HazelcastMemberBuilderTest.java b/server/sonar-process/src/test/java/org/sonar/process/cluster/hz/HazelcastMemberBuilderTest.java index f30be9e526f..810704a67e8 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/cluster/hz/HazelcastMemberBuilderTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/cluster/hz/HazelcastMemberBuilderTest.java @@ -31,7 +31,7 @@ import org.sonar.process.ProcessId; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; -import static org.sonar.process.ProcessProperties.Property.CLUSTER_NODE_PORT; +import static org.sonar.process.ProcessProperties.Property.CLUSTER_NODE_HZ_PORT; public class HazelcastMemberBuilderTest { @@ -70,9 +70,9 @@ public class HazelcastMemberBuilderTest { underTest.setMembers(asList("foo", "bar:9100", "1.2.3.4")); assertThat(underTest.getMembers()).containsExactly( - "foo:" + CLUSTER_NODE_PORT.getDefaultValue(), + "foo:" + CLUSTER_NODE_HZ_PORT.getDefaultValue(), "bar:9100", - "1.2.3.4:" + CLUSTER_NODE_PORT.getDefaultValue()); + "1.2.3.4:" + CLUSTER_NODE_HZ_PORT.getDefaultValue()); } @Test |