From 60a254621a3d07a6c3c4611ea86cffd9625e8fb2 Mon Sep 17 00:00:00 2001 From: Prabhu Joseph Date: Fri, 24 Jul 2020 16:59:15 +0530 Subject: [PATCH] YARN-10366. Fix Yarn rmadmin help message shows two labels for one node for --replaceLabelsOnNode. Contributed by Tanu Ajmera. --- .../java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java | 4 ++-- .../org/apache/hadoop/yarn/client/cli/TestRMAdminCLI.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java index 489509b849..69fd1178de 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java @@ -140,7 +140,7 @@ public class RMAdminCLI extends HAAdmin { "remove from cluster node labels")) .put("-replaceLabelsOnNode", new UsageInfo( - "<\"node1[:port]=label1,label2 node2[:port]=label1,label2\"> " + "<\"node1[:port]=label1 node2[:port]=label2\"> " + "[-failOnUnknownNodes] ", "replace labels on nodes" + " (please note that we do not support specifying multiple" @@ -280,7 +280,7 @@ private static void printHelp(String cmd, boolean isHAEnabled) { + "label2(exclusive=false),label3\">]" + " [-removeFromClusterNodeLabels ]" + " [-replaceLabelsOnNode " - + "<\"node1[:port]=label1,label2 node2[:port]=label1\"> " + + "<\"node1[:port]=label1 node2[:port]=label2\"> " + "[-failOnUnknownNodes]]" + " [-directlyAccessNodeLabelStore]" + " [-refreshClusterMaxPriority]" diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestRMAdminCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestRMAdminCLI.java index 40b393ff3f..e0b0041afa 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestRMAdminCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestRMAdminCLI.java @@ -703,7 +703,7 @@ public void testHelp() throws Exception { "<\"label1(exclusive=true),label2(exclusive=false),label3\">] " + "[-removeFromClusterNodeLabels ] " + "[-replaceLabelsOnNode " + - "<\"node1[:port]=label1,label2 node2[:port]=label1\"> " + + "<\"node1[:port]=label1 node2[:port]=label2\"> " + "[-failOnUnknownNodes]] " + "[-directlyAccessNodeLabelStore] [-refreshClusterMaxPriority] " + "[-updateNodeResource [NodeID] [MemSize] [vCores] " @@ -795,7 +795,7 @@ public void testHelp() throws Exception { + " [username]] [-addToClusterNodeLabels <\"label1(exclusive=true)," + "label2(exclusive=false),label3\">]" + " [-removeFromClusterNodeLabels ] [-replaceLabelsOnNode " - + "<\"node1[:port]=label1,label2 node2[:port]=label1\"> " + + "<\"node1[:port]=label1 node2[:port]=label2\"> " + "[-failOnUnknownNodes]] [-directlyAccessNodeLabelStore] " + "[-refreshClusterMaxPriority] " + "[-updateNodeResource [NodeID] [MemSize] [vCores] "