YARN-1527. Fixed yarn rmadmin command to print the correct usage info. Contributed by Akira AJISAKA.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1553596 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
53bc888f0b
commit
3ee7f20c33
|
@ -269,6 +269,9 @@ Release 2.4.0 - UNRELEASED
|
|||
YARN-1451. TestResourceManager relies on the scheduler assigning multiple
|
||||
containers in a single node update. (Sandy Ryza via kasha)
|
||||
|
||||
YARN-1527. Fix yarn rmadmin command to print the correct usage info.
|
||||
(Akira AJISAKA via jianhe)
|
||||
|
||||
Release 2.3.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -122,13 +122,13 @@ public class RMAdminCLI extends HAAdmin {
|
|||
}
|
||||
}
|
||||
String space = (usageInfo.args == "") ? "" : " ";
|
||||
builder.append("Usage: java RMAdmin ["
|
||||
builder.append("Usage: yarn rmadmin ["
|
||||
+ cmd + space + usageInfo.args
|
||||
+ "]\n");
|
||||
}
|
||||
|
||||
private static void buildUsageMsg(StringBuilder builder) {
|
||||
builder.append("Usage: java RMAdmin");
|
||||
builder.append("Usage: yarn rmadmin\n");
|
||||
for (String cmdKey : ADMIN_USAGE.keySet()) {
|
||||
UsageInfo usageInfo = ADMIN_USAGE.get(cmdKey);
|
||||
builder.append(" " + cmdKey + " " + usageInfo.args + "\n");
|
||||
|
|
|
@ -241,37 +241,37 @@ public class TestRMAdminCLI {
|
|||
"commands if none"));
|
||||
|
||||
testError(new String[] { "-help", "-refreshQueues" },
|
||||
"Usage: java RMAdmin [-refreshQueues]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-refreshQueues]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-refreshNodes" },
|
||||
"Usage: java RMAdmin [-refreshNodes]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-refreshNodes]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-refreshUserToGroupsMappings" },
|
||||
"Usage: java RMAdmin [-refreshUserToGroupsMappings]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-refreshUserToGroupsMappings]", dataErr, 0);
|
||||
testError(
|
||||
new String[] { "-help", "-refreshSuperUserGroupsConfiguration" },
|
||||
"Usage: java RMAdmin [-refreshSuperUserGroupsConfiguration]",
|
||||
"Usage: yarn rmadmin [-refreshSuperUserGroupsConfiguration]",
|
||||
dataErr, 0);
|
||||
testError(new String[] { "-help", "-refreshAdminAcls" },
|
||||
"Usage: java RMAdmin [-refreshAdminAcls]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-refreshAdminAcls]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-refreshServiceAcl" },
|
||||
"Usage: java RMAdmin [-refreshServiceAcl]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-refreshServiceAcl]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-getGroups" },
|
||||
"Usage: java RMAdmin [-getGroups [username]]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-getGroups [username]]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-transitionToActive" },
|
||||
"Usage: java RMAdmin [-transitionToActive <serviceId>]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-transitionToActive <serviceId>]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-transitionToStandby" },
|
||||
"Usage: java RMAdmin [-transitionToStandby <serviceId>]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-transitionToStandby <serviceId>]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-getServiceState" },
|
||||
"Usage: java RMAdmin [-getServiceState <serviceId>]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-getServiceState <serviceId>]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-checkHealth" },
|
||||
"Usage: java RMAdmin [-checkHealth <serviceId>]", dataErr, 0);
|
||||
"Usage: yarn rmadmin [-checkHealth <serviceId>]", dataErr, 0);
|
||||
testError(new String[] { "-help", "-failover" },
|
||||
"Usage: java RMAdmin " +
|
||||
"Usage: yarn rmadmin " +
|
||||
"[-failover [--forcefence] [--forceactive] " +
|
||||
"<serviceId> <serviceId>]",
|
||||
dataErr, 0);
|
||||
|
||||
testError(new String[] { "-help", "-badParameter" },
|
||||
"Usage: java RMAdmin", dataErr, 0);
|
||||
"Usage: yarn rmadmin", dataErr, 0);
|
||||
testError(new String[] { "-badParameter" },
|
||||
"badParameter: Unknown command", dataErr, -1);
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue