Skip to content

Commit

Permalink
Add master as the table header alias for cluster_manager for compatib…
Browse files Browse the repository at this point in the history
…ility

Signed-off-by: Tianli Feng <[email protected]>
  • Loading branch information
Tianli Feng committed Mar 13, 2022
1 parent a8ff7a2 commit 45e04ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ protected Table getTableWithHeader(final RestRequest request) {
"node.role",
"alias:r,role,nodeRole;desc:m:master eligible node, d:data node, i:ingest node, -:coordinating node only"
);
table.addCell("cluster_manager", "alias:m;desc:*:current cluster manager");
// TODO: Remove the header alias 'master', after removing MASTER_ROLE. It's added for compatibility when using parameter 'h=master'.
table.addCell("cluster_manager", "alias:m,master;desc:*:current cluster manager");
table.addCell("name", "alias:n;desc:node name");

table.addCell("completion.size", "alias:cs,completionSize;default:false;text-align:right;desc:size of completion");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ private static void validateSpec(ClientYamlSuiteRestSpec restSpec) {
private Tuple<Version, Version> readVersionsFromCatNodes(RestClient restClient) throws IOException {
// we simply go to the _cat/nodes API and parse all versions in the cluster
final Request request = new Request("GET", "/_cat/nodes");
request.addParameter("h", "version,cluster_manager");
request.addParameter("h", "version,master");
request.setOptions(getCatNodesVersionMasterRequestOptions());
Response response = restClient.performRequest(request);
ClientYamlTestResponse restTestResponse = new ClientYamlTestResponse(response);
Expand Down

0 comments on commit 45e04ce

Please sign in to comment.