YARN-3397. yarn rmadmin should skip -failover. (J.Andreina via kasha)
(cherry picked from commit c906a1de72
)
This commit is contained in:
parent
0c4fa872be
commit
2158cd2bef
|
@ -31,6 +31,8 @@ Release 2.8.0 - UNRELEASED
|
||||||
YARN-2868. FairScheduler: Metric for latency to allocate first container
|
YARN-2868. FairScheduler: Metric for latency to allocate first container
|
||||||
for an application. (Ray Chiang via kasha)
|
for an application. (Ray Chiang via kasha)
|
||||||
|
|
||||||
|
YARN-3397. yarn rmadmin should skip -failover. (J.Andreina via kasha)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
YARN-3339. TestDockerContainerExecutor should pull a single image and not
|
YARN-3339. TestDockerContainerExecutor should pull a single image and not
|
||||||
|
|
|
@ -134,7 +134,8 @@ public class RMAdminCLI extends HAAdmin {
|
||||||
|
|
||||||
private static void appendHAUsage(final StringBuilder usageBuilder) {
|
private static void appendHAUsage(final StringBuilder usageBuilder) {
|
||||||
for (Map.Entry<String,UsageInfo> cmdEntry : USAGE.entrySet()) {
|
for (Map.Entry<String,UsageInfo> cmdEntry : USAGE.entrySet()) {
|
||||||
if (cmdEntry.getKey().equals("-help")) {
|
if (cmdEntry.getKey().equals("-help")
|
||||||
|
|| cmdEntry.getKey().equals("-failover")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
UsageInfo usageInfo = cmdEntry.getValue();
|
UsageInfo usageInfo = cmdEntry.getValue();
|
||||||
|
@ -225,7 +226,7 @@ public class RMAdminCLI extends HAAdmin {
|
||||||
}
|
}
|
||||||
if (isHAEnabled) {
|
if (isHAEnabled) {
|
||||||
for (String cmdKey : USAGE.keySet()) {
|
for (String cmdKey : USAGE.keySet()) {
|
||||||
if (!cmdKey.equals("-help")) {
|
if (!cmdKey.equals("-help") && !cmdKey.equals("-failover")) {
|
||||||
buildHelpMsg(cmdKey, helpBuilder);
|
buildHelpMsg(cmdKey, helpBuilder);
|
||||||
helpBuilder.append("\n");
|
helpBuilder.append("\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,16 +364,15 @@ public class TestRMAdminCLI {
|
||||||
assertEquals(0, rmAdminCLIWithHAEnabled.run(args));
|
assertEquals(0, rmAdminCLIWithHAEnabled.run(args));
|
||||||
oldOutPrintStream.println(dataOut);
|
oldOutPrintStream.println(dataOut);
|
||||||
String expectedHelpMsg =
|
String expectedHelpMsg =
|
||||||
"yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshSuper" +
|
"yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshSuper"
|
||||||
"UserGroupsConfiguration] [-refreshUserToGroupsMappings] " +
|
+ "UserGroupsConfiguration] [-refreshUserToGroupsMappings] "
|
||||||
"[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup" +
|
+ "[-refreshAdminAcls] [-refreshServiceAcl] [-getGroup"
|
||||||
" [username]] [[-addToClusterNodeLabels [label1,label2,label3]]" +
|
+ " [username]] [[-addToClusterNodeLabels [label1,label2,label3]]"
|
||||||
" [-removeFromClusterNodeLabels [label1,label2,label3]] [-replaceLabelsOnNode " +
|
+ " [-removeFromClusterNodeLabels [label1,label2,label3]] [-replaceLabelsOnNode "
|
||||||
"[node1[:port]=label1,label2 node2[:port]=label1] [-directlyAccessNodeLabelStore]] " +
|
+ "[node1[:port]=label1,label2 node2[:port]=label1] [-directlyAccessNodeLabelStore]] "
|
||||||
"[-transitionToActive [--forceactive] <serviceId>] " +
|
+ "[-transitionToActive [--forceactive] <serviceId>] "
|
||||||
"[-transitionToStandby <serviceId>] [-failover" +
|
+ "[-transitionToStandby <serviceId>] "
|
||||||
" [--forcefence] [--forceactive] <serviceId> <serviceId>] " +
|
+ "[-getServiceState <serviceId>] [-checkHealth <serviceId>] [-help [cmd]]";
|
||||||
"[-getServiceState <serviceId>] [-checkHealth <serviceId>] [-help [cmd]]";
|
|
||||||
String actualHelpMsg = dataOut.toString();
|
String actualHelpMsg = dataOut.toString();
|
||||||
assertTrue(String.format("Help messages: %n " + actualHelpMsg + " %n doesn't include expected " +
|
assertTrue(String.format("Help messages: %n " + actualHelpMsg + " %n doesn't include expected " +
|
||||||
"messages: %n" + expectedHelpMsg), actualHelpMsg.contains(expectedHelpMsg
|
"messages: %n" + expectedHelpMsg), actualHelpMsg.contains(expectedHelpMsg
|
||||||
|
|
Loading…
Reference in New Issue