Skip to content

Commit

Permalink
Rename clusterManagerNodeNames
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed Mar 16, 2022
1 parent 4f1211c commit 717bc11
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ private synchronized void reset(boolean wipeData) throws IOException {
}

int autoBootstrapMasterNodeIndex = -1;
final List<String> masterNodeNames = settings.stream()
final List<String> clusterManagerNodeNames = settings.stream()
.filter(DiscoveryNode::isMasterNode)
.map(Node.NODE_NAME_SETTING::get)
.collect(Collectors.toList());
Expand All @@ -1177,7 +1177,10 @@ private synchronized void reset(boolean wipeData) throws IOException {
for (int i = 0; i < numSharedDedicatedClusterManagerNodes + numSharedDataNodes + numSharedCoordOnlyNodes; i++) {
Settings nodeSettings = updatedSettings.get(i);
if (i == autoBootstrapMasterNodeIndex) {
nodeSettings = Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), masterNodeNames).put(nodeSettings).build();
nodeSettings = Settings.builder()
.putList(INITIAL_MASTER_NODES_SETTING.getKey(), clusterManagerNodeNames)
.put(nodeSettings)
.build();
}
final NodeAndClient nodeAndClient = buildNode(i, nodeSettings, true, onTransportServiceStarted);
toStartAndPublish.add(nodeAndClient);
Expand Down

0 comments on commit 717bc11

Please sign in to comment.