hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junping...@apache.org
Subject hadoop git commit: YARN-2970. NodeLabel operations in RMAdmin CLI get missing in help command. (Contributed by Varun Saxena) (cherry picked from commit e1ee0d45ea3315e7fbe1d28a7a35a0ce0c54483b)
Date Wed, 24 Dec 2014 02:15:51 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 653b3fada -> ae3faab13


YARN-2970. NodeLabel operations in RMAdmin CLI get missing in help command. (Contributed by
Varun Saxena)
(cherry picked from commit e1ee0d45ea3315e7fbe1d28a7a35a0ce0c54483b)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ae3faab1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ae3faab1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ae3faab1

Branch: refs/heads/branch-2
Commit: ae3faab13eaf784aea74ea48f1e2684d73f1430b
Parents: 653b3fa
Author: Junping Du <junping_du@apache.org>
Authored: Tue Dec 23 18:23:45 2014 -0800
Committer: Junping Du <junping_du@apache.org>
Committed: Tue Dec 23 18:24:45 2014 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                       |  3 +++
 .../org/apache/hadoop/yarn/client/cli/RMAdminCLI.java | 12 ++++++++----
 .../apache/hadoop/yarn/client/cli/TestRMAdminCLI.java | 14 ++++++++++----
 3 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ae3faab1/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 3ed97af..6daef60 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -114,6 +114,9 @@ Release 2.7.0 - UNRELEASED
 
     YARN-2949. Add documentation for CGroups (Varun Vasudev via junping_du)
 
+    YARN-2970. NodeLabel operations in RMAdmin CLI get missing in help command.
+    (Varun Saxena via junping_du)
+
   OPTIMIZATIONS
 
   BUG FIXES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ae3faab1/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java
----------------------------------------------------------------------
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 af2321e..9ea333c 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
@@ -93,9 +93,6 @@ public class RMAdminCLI extends HAAdmin {
                   "ResoureceManager will reload the authorization policy file."))
           .put("-getGroups", new UsageInfo("[username]",
               "Get the groups which given user belongs to."))
-          .put("-help", new UsageInfo("[cmd]",
-              "Displays help for the given command or all commands if none " +
-                  "is specified."))
           .put("-addToClusterNodeLabels",
               new UsageInfo("[label1,label2,label3] (label splitted by \",\")",
                   "add to cluster node labels "))
@@ -184,6 +181,7 @@ public class RMAdminCLI extends HAAdmin {
         }
       }
     }
+    builder.append("   -help" + " [cmd]\n");
   }
 
   private static void printHelp(String cmd, boolean isHAEnabled) {
@@ -199,10 +197,14 @@ public class RMAdminCLI extends HAAdmin {
       " [-refreshAdminAcls]" +
       " [-refreshServiceAcl]" +
       " [-getGroup [username]]" +
-      " [-help [cmd]]");
+      " [[-addToClusterNodeLabels [label1,label2,label3]]" +
+      " [-removeFromClusterNodeLabels [label1,label2,label3]]" +
+      " [-replaceLabelsOnNode [node1:port,label1,label2 node2:port,label1]" +
+      " [-directlyAccessNodeLabelStore]]");
     if (isHAEnabled) {
       appendHAUsage(summary);
     }
+    summary.append(" [-help [cmd]]");
     summary.append("\n");
 
     StringBuilder helpBuilder = new StringBuilder();
@@ -219,6 +221,8 @@ public class RMAdminCLI extends HAAdmin {
         }
       }
     }
+    helpBuilder.append("   -help [cmd]: Displays help for the given command or all commands"
+
+        " if none is specified.");
     System.out.println(helpBuilder);
     System.out.println();
     ToolRunner.printGenericCommandUsage(System.out);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ae3faab1/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestRMAdminCLI.java
----------------------------------------------------------------------
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 69b79da..73c3795 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
@@ -279,7 +279,10 @@ public class TestRMAdminCLI {
               "yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshSuper" +
               "UserGroupsConfiguration] [-refreshUserToGroupsMappings] " +
               "[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup" +
-              " [username]] [-help [cmd]]"));
+              " [username]] [[-addToClusterNodeLabels [label1,label2,label3]]" +
+              " [-removeFromClusterNodeLabels [label1,label2,label3]] [-replaceLabelsOnNode
" +
+              "[node1:port,label1,label2 node2:port,label1] [-directlyAccessNodeLabelStore]]
" +
+              "[-help [cmd]]"));
       assertTrue(dataOut
           .toString()
           .contains(
@@ -358,10 +361,13 @@ public class TestRMAdminCLI {
               "yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshSuper" +
               "UserGroupsConfiguration] [-refreshUserToGroupsMappings] " +
               "[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup" +
-              " [username]] [-help [cmd]] [-transitionToActive <serviceId>" + 
-              " [--forceactive]] [-transitionToStandby <serviceId>] [-failover" +
+              " [username]] [[-addToClusterNodeLabels [label1,label2,label3]]" +
+              " [-removeFromClusterNodeLabels [label1,label2,label3]] [-replaceLabelsOnNode
" +
+              "[node1:port,label1,label2 node2:port,label1] [-directlyAccessNodeLabelStore]]
" +
+              "[-transitionToActive <serviceId> [--forceactive]] " + 
+              "[-transitionToStandby <serviceId>] [-failover" +
               " [--forcefence] [--forceactive] <serviceId> <serviceId>] " +
-              "[-getServiceState <serviceId>] [-checkHealth <serviceId>]"));
+              "[-getServiceState <serviceId>] [-checkHealth <serviceId>] [-help
[cmd]]"));
     } finally {
       System.setOut(oldOutPrintStream);
       System.setErr(oldErrPrintStream);


Mime
View raw message