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

This commit is contained in:
Wangda Tan 2015-05-27 15:34:17 -07:00
parent 788406e90c
commit cab7674e54
5 changed files with 27 additions and 17 deletions

View File

@ -268,6 +268,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

View File

@ -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."

View File

@ -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]);

View File

@ -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,");

View File

@ -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]]";