Skip to content

Commit 60a2546

Browse files
Prabhu JosephPrabhu Joseph
authored andcommitted
YARN-10366. Fix Yarn rmadmin help message shows two labels for one node for --replaceLabelsOnNode.
Contributed by Tanu Ajmera.
1 parent d02be17 commit 60a2546

File tree

2 files changed

+4
-4
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src

2 files changed

+4
-4
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public class RMAdminCLI extends HAAdmin {
140140
"remove from cluster node labels"))
141141
.put("-replaceLabelsOnNode",
142142
new UsageInfo(
143-
"<\"node1[:port]=label1,label2 node2[:port]=label1,label2\"> "
143+
"<\"node1[:port]=label1 node2[:port]=label2\"> "
144144
+ "[-failOnUnknownNodes] ",
145145
"replace labels on nodes"
146146
+ " (please note that we do not support specifying multiple"
@@ -280,7 +280,7 @@ private static void printHelp(String cmd, boolean isHAEnabled) {
280280
+ "label2(exclusive=false),label3\">]"
281281
+ " [-removeFromClusterNodeLabels <label1,label2,label3>]"
282282
+ " [-replaceLabelsOnNode "
283-
+ "<\"node1[:port]=label1,label2 node2[:port]=label1\"> "
283+
+ "<\"node1[:port]=label1 node2[:port]=label2\"> "
284284
+ "[-failOnUnknownNodes]]"
285285
+ " [-directlyAccessNodeLabelStore]"
286286
+ " [-refreshClusterMaxPriority]"

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestRMAdminCLI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ public void testHelp() throws Exception {
703703
"<\"label1(exclusive=true),label2(exclusive=false),label3\">] " +
704704
"[-removeFromClusterNodeLabels <label1,label2,label3>] " +
705705
"[-replaceLabelsOnNode " +
706-
"<\"node1[:port]=label1,label2 node2[:port]=label1\"> " +
706+
"<\"node1[:port]=label1 node2[:port]=label2\"> " +
707707
"[-failOnUnknownNodes]] " +
708708
"[-directlyAccessNodeLabelStore] [-refreshClusterMaxPriority] " +
709709
"[-updateNodeResource [NodeID] [MemSize] [vCores] "
@@ -795,7 +795,7 @@ public void testHelp() throws Exception {
795795
+ " [username]] [-addToClusterNodeLabels <\"label1(exclusive=true),"
796796
+ "label2(exclusive=false),label3\">]"
797797
+ " [-removeFromClusterNodeLabels <label1,label2,label3>] [-replaceLabelsOnNode "
798-
+ "<\"node1[:port]=label1,label2 node2[:port]=label1\"> "
798+
+ "<\"node1[:port]=label1 node2[:port]=label2\"> "
799799
+ "[-failOnUnknownNodes]] [-directlyAccessNodeLabelStore] "
800800
+ "[-refreshClusterMaxPriority] "
801801
+ "[-updateNodeResource [NodeID] [MemSize] [vCores] "

0 commit comments

Comments
 (0)