YARN-9162. Fix TestRMAdminCLI#testHelp. Contributed by Ayush Saxena.
(cherry picked from commit 5db7c49062
)
This commit is contained in:
parent
2fc4123fe0
commit
a453f38015
|
@ -187,7 +187,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")) {
|
|| cmdEntry.getKey().equals("-failover")
|
||||||
|
|| cmdEntry.getKey().equals("-transitionToObserver")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
UsageInfo usageInfo = cmdEntry.getValue();
|
UsageInfo usageInfo = cmdEntry.getValue();
|
||||||
|
@ -302,7 +303,8 @@ public class RMAdminCLI extends HAAdmin {
|
||||||
}
|
}
|
||||||
if (isHAEnabled) {
|
if (isHAEnabled) {
|
||||||
for (String cmdKey : USAGE.keySet()) {
|
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);
|
buildHelpMsg(cmdKey, helpBuilder);
|
||||||
helpBuilder.append("\n");
|
helpBuilder.append("\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue