We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f06766e commit 70c8f4aCopy full SHA for 70c8f4a
server/src/main/java/org/opensearch/rest/action/cat/RestNodesAction.java
@@ -419,7 +419,13 @@ Table buildTable(
419
if (node.getRoles().isEmpty()) {
420
roles = "-";
421
} else {
422
- roles = node.getRoles().stream().map(DiscoveryNodeRole::roleNameAbbreviation).sorted().collect(Collectors.joining());
+ // TODO: Remove '.distinct()' after removing DiscoveryNodeRole.MASTER_ROLE, because the role abbr name should be unique.
423
+ roles = node.getRoles()
424
+ .stream()
425
+ .map(DiscoveryNodeRole::roleNameAbbreviation)
426
+ .sorted()
427
+ .distinct()
428
+ .collect(Collectors.joining());
429
}
430
table.addCell(roles);
431
table.addCell(masterId == null ? "x" : masterId.equals(node.getId()) ? "*" : "-");
0 commit comments