YARN-9162. Fix TestRMAdminCLI#testHelp. Contributed by Ayush Saxena.

(cherry picked from commit 5db7c49062)
(cherry picked from commit a453f38015)
This commit is contained in:
Akira Ajisaka 2019-01-07 17:32:28 +09:00 committed by Jonathan Hung
parent e3c01e174c
commit 3c9d2f5317
1 changed files with 4 additions and 2 deletions

View File

@ -190,7 +190,8 @@ public class RMAdminCLI extends HAAdmin {
private static void appendHAUsage(final StringBuilder usageBuilder) {
for (Map.Entry<String,UsageInfo> cmdEntry : USAGE.entrySet()) {
if (cmdEntry.getKey().equals("-help")
|| cmdEntry.getKey().equals("-failover")) {
|| cmdEntry.getKey().equals("-failover")
|| cmdEntry.getKey().equals("-transitionToObserver")) {
continue;
}
UsageInfo usageInfo = cmdEntry.getValue();
@ -305,7 +306,8 @@ public class RMAdminCLI extends HAAdmin {
}
if (isHAEnabled) {
for (String cmdKey : USAGE.keySet()) {
if (!cmdKey.equals("-help") && !cmdKey.equals("-failover")) {
if (!cmdKey.equals("-help") && !cmdKey.equals("-failover")
&& !cmdKey.equals("-transitionToObserver")) {
buildHelpMsg(cmdKey, helpBuilder);
helpBuilder.append("\n");
}