From 49f5a9d76b06e859f6663db5abe9f9b4fef31d42 Mon Sep 17 00:00:00 2001 From: Tianli Feng Date: Sat, 12 Mar 2022 22:33:06 -0800 Subject: [PATCH] Add 'discovered_master' as the table header alias for 'discovered_cluster_manager' for compatibility Signed-off-by: Tianli Feng --- .../org/opensearch/rest/action/cat/RestHealthAction.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/rest/action/cat/RestHealthAction.java b/server/src/main/java/org/opensearch/rest/action/cat/RestHealthAction.java index d43b512e77802..c05b0b9c77129 100644 --- a/server/src/main/java/org/opensearch/rest/action/cat/RestHealthAction.java +++ b/server/src/main/java/org/opensearch/rest/action/cat/RestHealthAction.java @@ -88,7 +88,12 @@ protected Table getTableWithHeader(final RestRequest request) { t.addCell("status", "alias:st;desc:health status"); t.addCell("node.total", "alias:nt,nodeTotal;text-align:right;desc:total number of nodes"); t.addCell("node.data", "alias:nd,nodeData;text-align:right;desc:number of nodes that can store data"); - t.addCell("discovered_cluster_manager", "alias:dm;text-align:right;desc:cluster manager is discovered or not"); + // TODO: Remove the header alias 'discovered_master', after removing MASTER_ROLE. + // The alias 'discovered_master' is added for compatibility when using request parameter 'h=discovered_master'. + t.addCell( + "discovered_cluster_manager", + "alias:dcm,dm,discovered_master;text-align:right;desc:cluster manager is discovered or not" + ); t.addCell("shards", "alias:t,sh,shards.total,shardsTotal;text-align:right;desc:total number of shards"); t.addCell("pri", "alias:p,shards.primary,shardsPrimary;text-align:right;desc:number of primary shards"); t.addCell("relo", "alias:r,shards.relocating,shardsRelocating;text-align:right;desc:number of relocating nodes");