hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject hadoop git commit: YARN-3581. Deprecate -directlyAccessNodeLabelStore in RMAdminCLI. (Naganarasimha G R via wangda)
Date Wed, 27 May 2015 22:40:07 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 7cd0874df -> 479049553


YARN-3581. Deprecate -directlyAccessNodeLabelStore in RMAdminCLI. (Naganarasimha G R via wangda)

(cherry picked from commit cab7674e54c4fe56838668462de99a6787841309)


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

Branch: refs/heads/branch-2
Commit: 4790495538a15c56930a20ade2b090d1e1fd7940
Parents: 7cd0874
Author: Wangda Tan <wangda@apache.org>
Authored: Wed May 27 15:34:17 2015 -0700
Committer: Wangda Tan <wangda@apache.org>
Committed: Wed May 27 15:37:14 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                 |  3 +++
 .../hadoop/yarn/client/cli/ClusterCLI.java      |  2 +-
 .../hadoop/yarn/client/cli/RMAdminCLI.java      | 22 ++++++++++++--------
 .../hadoop/yarn/client/cli/TestClusterCLI.java  |  4 +++-
 .../hadoop/yarn/client/cli/TestRMAdminCLI.java  | 13 ++++++------
 5 files changed, 27 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/47904955/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 58eb7ea..ea99f7f 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -223,6 +223,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3647. RMWebServices api's should use updated api from CommonNodeLabelsManager 
     to get NodeLabel object. (Sunil G via wangda)
 
+    YARN-3581. Deprecate -directlyAccessNodeLabelStore in RMAdminCLI. 
+    (Naganarasimha G R via wangda)
+
   OPTIMIZATIONS
 
     YARN-3339. TestDockerContainerExecutor should pull a single image and not

http://git-wip-us.apache.org/repos/asf/hadoop/blob/47904955/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ClusterCLI.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ClusterCLI.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ClusterCLI.java
index 8765e41..b930014 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ClusterCLI.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ClusterCLI.java
@@ -73,7 +73,7 @@ public class ClusterCLI extends YarnCLI {
         "List cluster node-label collection");
     opts.addOption("h", HELP_CMD, false, "Displays help for all commands.");
     opts.addOption("dnl", DIRECTLY_ACCESS_NODE_LABEL_STORE, false,
-        "Directly access node label store, "
+        "This is DEPRECATED, will be removed in future releases. Directly access node label
store, "
             + "with this option, all node label related operations"
             + " will NOT connect RM. Instead, they will"
             + " access/modify stored node labels directly."

http://git-wip-us.apache.org/repos/asf/hadoop/blob/47904955/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 44abe6e..932b62d 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
@@ -109,20 +109,20 @@ public class RMAdminCLI extends HAAdmin {
           .put("-getGroups", new UsageInfo("[username]",
               "Get the groups which given user belongs to."))
           .put("-addToClusterNodeLabels",
-              new UsageInfo("[label1(exclusive=true),"
-                  + "label2(exclusive=false),label3]",
-                  "add to cluster node labels "))
+              new UsageInfo("<\"label1(exclusive=true),"
+                  + "label2(exclusive=false),label3\">",
+                  "add to cluster node labels. Default exclusivity is true"))
           .put("-removeFromClusterNodeLabels",
-              new UsageInfo("[label1,label2,label3] (label splitted by \",\")",
+              new UsageInfo("<label1,label2,label3> (label splitted by \",\")",
                   "remove from cluster node labels"))
           .put("-replaceLabelsOnNode",
               new UsageInfo(
-                  "[node1[:port]=label1,label2 node2[:port]=label1,label2]",
+                  "<\"node1[:port]=label1,label2 node2[:port]=label1,label2\">",
                   "replace labels on nodes"
                       + " (please note that we do not support specifying multiple"
                       + " labels on a single host for now.)"))
           .put("-directlyAccessNodeLabelStore",
-              new UsageInfo("", "Directly access node label store, "
+              new UsageInfo("", "This is DEPRECATED, will be removed in future releases.
Directly access node label store, "
                   + "with this option, all node label related operations"
                   + " will not connect RM. Instead, they will"
                   + " access/modify stored node labels directly."
@@ -222,9 +222,10 @@ public class RMAdminCLI extends HAAdmin {
       " [-refreshAdminAcls]" +
       " [-refreshServiceAcl]" +
       " [-getGroup [username]]" +
-      " [[-addToClusterNodeLabels [label1,label2,label3]]" +
-      " [-removeFromClusterNodeLabels [label1,label2,label3]]" +
-      " [-replaceLabelsOnNode [node1[:port]=label1,label2 node2[:port]=label1]" +
+      " [-addToClusterNodeLabels <\"label1(exclusive=true),"
+                  + "label2(exclusive=false),label3\">]" +
+      " [-removeFromClusterNodeLabels <label1,label2,label3>]" +
+      " [-replaceLabelsOnNode <\"node1[:port]=label1,label2 node2[:port]=label1\">]"
+
       " [-directlyAccessNodeLabelStore]]");
     if (isHAEnabled) {
       appendHAUsage(summary);
@@ -681,6 +682,7 @@ public class RMAdminCLI extends HAAdmin {
       } else if ("-addToClusterNodeLabels".equals(cmd)) {
         if (i >= args.length) {
           System.err.println(NO_LABEL_ERR_MSG);
+          printUsage("", isHAEnabled);
           exitCode = -1;
         } else {
           exitCode = addToClusterNodeLabels(args[i]);
@@ -688,6 +690,7 @@ public class RMAdminCLI extends HAAdmin {
       } else if ("-removeFromClusterNodeLabels".equals(cmd)) {
         if (i >= args.length) {
           System.err.println(NO_LABEL_ERR_MSG);
+          printUsage("", isHAEnabled);
           exitCode = -1;
         } else {
           exitCode = removeFromClusterNodeLabels(args[i]);
@@ -695,6 +698,7 @@ public class RMAdminCLI extends HAAdmin {
       } else if ("-replaceLabelsOnNode".equals(cmd)) {
         if (i >= args.length) {
           System.err.println(NO_MAPPING_ERR_MSG);
+          printUsage("", isHAEnabled);
           exitCode = -1;
         } else {
           exitCode = replaceLabelsOnNodes(args[i]);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/47904955/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestClusterCLI.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestClusterCLI.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestClusterCLI.java
index d9c7de9..5a0f049 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestClusterCLI.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestClusterCLI.java
@@ -137,7 +137,9 @@ public class TestClusterCLI {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     PrintWriter pw = new PrintWriter(baos);
     pw.println("usage: yarn cluster");
-    pw.println(" -dnl,--directly-access-node-label-store   Directly access node label");
+    pw.println(" -dnl,--directly-access-node-label-store   This is DEPRECATED, will be");
+    pw.println("                                           removed in future releases.");
+    pw.println("                                           Directly access node label");
     pw.println("                                           store, with this option, all");
     pw.println("                                           node label related operations");
     pw.println("                                           will NOT connect RM. Instead,");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/47904955/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 f8f23f4..a95412c 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
@@ -333,9 +333,9 @@ public class TestRMAdminCLI {
               "yarn rmadmin [-refreshQueues] [-refreshNodes [-g [timeout in seconds]]] [-refreshSuper"
+
               "UserGroupsConfiguration] [-refreshUserToGroupsMappings] " +
               "[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup" +
-              " [username]] [[-addToClusterNodeLabels [label1,label2,label3]]" +
-              " [-removeFromClusterNodeLabels [label1,label2,label3]] [-replaceLabelsOnNode
" +
-              "[node1[:port]=label1,label2 node2[:port]=label1] [-directlyAccessNodeLabelStore]]
" +
+              " [username]] [-addToClusterNodeLabels <\"label1(exclusive=true),label2(exclusive=false),label3\">]"
+
+              " [-removeFromClusterNodeLabels <label1,label2,label3>] [-replaceLabelsOnNode
" +
+              "<\"node1[:port]=label1,label2 node2[:port]=label1\">] [-directlyAccessNodeLabelStore]]
" +
               "[-help [cmd]]"));
       assertTrue(dataOut
           .toString()
@@ -413,9 +413,10 @@ public class TestRMAdminCLI {
           "yarn rmadmin [-refreshQueues] [-refreshNodes [-g [timeout in seconds]]] [-refreshSuper"
               + "UserGroupsConfiguration] [-refreshUserToGroupsMappings] "
               + "[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup"
-              + " [username]] [[-addToClusterNodeLabels [label1,label2,label3]]"
-              + " [-removeFromClusterNodeLabels [label1,label2,label3]] [-replaceLabelsOnNode
"
-              + "[node1[:port]=label1,label2 node2[:port]=label1] [-directlyAccessNodeLabelStore]]
"
+              + " [username]] [-addToClusterNodeLabels <\"label1(exclusive=true),"
+                  + "label2(exclusive=false),label3\">]"
+              + " [-removeFromClusterNodeLabels <label1,label2,label3>] [-replaceLabelsOnNode
"
+              + "<\"node1[:port]=label1,label2 node2[:port]=label1\">] [-directlyAccessNodeLabelStore]]
"
               + "[-transitionToActive [--forceactive] <serviceId>] "
               + "[-transitionToStandby <serviceId>] "
               + "[-getServiceState <serviceId>] [-checkHealth <serviceId>] [-help
[cmd]]";


Mime
View raw message