Skip to content

Commit

Permalink
YARN-11483. [Federation] Router AdminCLI Supports Clean Finish Apps.
Browse files Browse the repository at this point in the history
  • Loading branch information
slfan1989 committed Nov 4, 2023
1 parent 2b1378c commit c9e5a2b
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,34 @@ public class RouterCLI extends Configured implements Tool {
.addExample(POLICY_LIST_USAGE.args, POLICY_LIST_USAGE_EXAMPLE_1)
.addExample(POLICY_LIST_USAGE.args, POLICY_LIST_USAGE_EXAMPLE_2);

// Command3: application
private static final String CMD_APPLICATION = "-application";

// Application Delete
protected final static UsageInfo APPLICATION_DELETE_USAGE = new UsageInfo(
"--delete <application_id>",
"This command is used to delete the specified application.");

protected final static String APPLICATION_DELETE_USAGE_EXAMPLE_DESC =
"If we want to delete application_1440536969523_0001.";

protected final static String APPLICATION_DELETE_USAGE_EXAMPLE_1 =
"yarn routeradmin -application --delete application_1440536969523_0001";

protected final static RouterCmdUsageInfos APPLICATION_USAGEINFOS = new RouterCmdUsageInfos()
// application delete
.addUsageInfo(APPLICATION_DELETE_USAGE)
.addExampleDescs(APPLICATION_DELETE_USAGE.args, APPLICATION_DELETE_USAGE_EXAMPLE_DESC)
.addExample(APPLICATION_DELETE_USAGE.args, APPLICATION_DELETE_USAGE_EXAMPLE_1);

protected final static Map<String, RouterCmdUsageInfos> ADMIN_USAGE =
ImmutableMap.<String, RouterCmdUsageInfos>builder()
// Command1: deregisterSubCluster
.put(CMD_DEREGISTERSUBCLUSTER, DEREGISTER_SUBCLUSTER_USAGEINFOS)
// Command2: policy
.put(CMD_POLICY, POLICY_USAGEINFOS)
// Command3: application
.put(CMD_APPLICATION, APPLICATION_USAGEINFOS)
.build();

public RouterCLI() {
Expand Down

0 comments on commit c9e5a2b

Please sign in to comment.