diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-07 10:59:13 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-08-07 10:59:13 +0200 |
commit | 993cca8233e08537ab57d57316f03017b8a96b46 (patch) | |
tree | 1b625c297a1205e4ee454d415d71e62e478796e4 /server/sonar-search | |
parent | 2cb85007b22eebc03340d7faebcbc60fce3385eb (diff) | |
download | sonarqube-993cca8233e08537ab57d57316f03017b8a96b46.tar.gz sonarqube-993cca8233e08537ab57d57316f03017b8a96b46.zip |
SONAR-5483 - Fixed null rack_id in searchProcess and ESNode
Diffstat (limited to 'server/sonar-search')
-rw-r--r-- | server/sonar-search/src/main/java/org/sonar/search/SearchServer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java index 8ac70a0b7e4..f1de561955c 100644 --- a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java +++ b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java @@ -118,7 +118,7 @@ public class SearchServer extends MonitoredProcess { // Set cluster coordinates esSettings.put("cluster.name", clusterName); - esSettings.put("node.rack_id", props.of(SONAR_NODE_NAME)); + esSettings.put("node.rack_id", StringUtils.defaultIfEmpty(props.of(SONAR_NODE_NAME), "unknown")); esSettings.put("cluster.routing.allocation.awareness.attributes","rack_id"); if (props.contains(SONAR_NODE_NAME)) { esSettings.put("node.name", props.of(SONAR_NODE_NAME)); |