YARN-3397. yarn rmadmin should skip -failover. (J.Andreina via kasha)

(cherry picked from commit c906a1de72)
This commit is contained in:
Karthik Kambatla 2015-03-25 07:42:27 -07:00
parent 0c4fa872be
commit 2158cd2bef
3 changed files with 14 additions and 12 deletions

View File

@ -31,6 +31,8 @@ Release 2.8.0 - UNRELEASED
YARN-2868. FairScheduler: Metric for latency to allocate first container
for an application. (Ray Chiang via kasha)
YARN-3397. yarn rmadmin should skip -failover. (J.Andreina via kasha)
OPTIMIZATIONS
YARN-3339. TestDockerContainerExecutor should pull a single image and not

View File

@ -134,7 +134,8 @@ protected void setErrOut(PrintStream errOut) {
private static void appendHAUsage(final StringBuilder usageBuilder) {
for (Map.Entry<String,UsageInfo> cmdEntry : USAGE.entrySet()) {
if (cmdEntry.getKey().equals("-help")) {
if (cmdEntry.getKey().equals("-help")
|| cmdEntry.getKey().equals("-failover")) {
continue;
}
UsageInfo usageInfo = cmdEntry.getValue();
@ -225,7 +226,7 @@ private static void printHelp(String cmd, boolean isHAEnabled) {
}
if (isHAEnabled) {
for (String cmdKey : USAGE.keySet()) {
if (!cmdKey.equals("-help")) {
if (!cmdKey.equals("-help") && !cmdKey.equals("-failover")) {
buildHelpMsg(cmdKey, helpBuilder);
helpBuilder.append("\n");
}

View File

@ -364,16 +364,15 @@ public void testHelp() throws Exception {
assertEquals(0, rmAdminCLIWithHAEnabled.run(args));
oldOutPrintStream.println(dataOut);
String expectedHelpMsg =
"yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshSuper" +
"UserGroupsConfiguration] [-refreshUserToGroupsMappings] " +
"[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup" +
" [username]] [[-addToClusterNodeLabels [label1,label2,label3]]" +
" [-removeFromClusterNodeLabels [label1,label2,label3]] [-replaceLabelsOnNode " +
"[node1[:port]=label1,label2 node2[:port]=label1] [-directlyAccessNodeLabelStore]] " +
"[-transitionToActive [--forceactive] <serviceId>] " +
"[-transitionToStandby <serviceId>] [-failover" +
" [--forcefence] [--forceactive] <serviceId> <serviceId>] " +
"[-getServiceState <serviceId>] [-checkHealth <serviceId>] [-help [cmd]]";
"yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshSuper"
+ "UserGroupsConfiguration] [-refreshUserToGroupsMappings] "
+ "[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup"
+ " [username]] [[-addToClusterNodeLabels [label1,label2,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]]";
String actualHelpMsg = dataOut.toString();
assertTrue(String.format("Help messages: %n " + actualHelpMsg + " %n doesn't include expected " +
"messages: %n" + expectedHelpMsg), actualHelpMsg.contains(expectedHelpMsg