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

This commit is contained in:
Akira Ajisaka 2019-01-07 17:32:28 +09:00
parent 944cf87223
commit 5db7c49062
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50

View File

@ -187,7 +187,8 @@ protected void setOut(PrintStream out) {
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();
@ -302,7 +303,8 @@ private static void printHelp(String cmd, boolean isHAEnabled) {
}
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");
}