Skip to content

Commit c9e5a2b

Browse files
committed
YARN-11483. [Federation] Router AdminCLI Supports Clean Finish Apps.
1 parent 2b1378c commit c9e5a2b

File tree

1 file changed

+22
-0
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli

1 file changed

+22
-0
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RouterCLI.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,34 @@ public class RouterCLI extends Configured implements Tool {
227227
.addExample(POLICY_LIST_USAGE.args, POLICY_LIST_USAGE_EXAMPLE_1)
228228
.addExample(POLICY_LIST_USAGE.args, POLICY_LIST_USAGE_EXAMPLE_2);
229229

230+
// Command3: application
231+
private static final String CMD_APPLICATION = "-application";
232+
233+
// Application Delete
234+
protected final static UsageInfo APPLICATION_DELETE_USAGE = new UsageInfo(
235+
"--delete <application_id>",
236+
"This command is used to delete the specified application.");
237+
238+
protected final static String APPLICATION_DELETE_USAGE_EXAMPLE_DESC =
239+
"If we want to delete application_1440536969523_0001.";
240+
241+
protected final static String APPLICATION_DELETE_USAGE_EXAMPLE_1 =
242+
"yarn routeradmin -application --delete application_1440536969523_0001";
243+
244+
protected final static RouterCmdUsageInfos APPLICATION_USAGEINFOS = new RouterCmdUsageInfos()
245+
// application delete
246+
.addUsageInfo(APPLICATION_DELETE_USAGE)
247+
.addExampleDescs(APPLICATION_DELETE_USAGE.args, APPLICATION_DELETE_USAGE_EXAMPLE_DESC)
248+
.addExample(APPLICATION_DELETE_USAGE.args, APPLICATION_DELETE_USAGE_EXAMPLE_1);
249+
230250
protected final static Map<String, RouterCmdUsageInfos> ADMIN_USAGE =
231251
ImmutableMap.<String, RouterCmdUsageInfos>builder()
232252
// Command1: deregisterSubCluster
233253
.put(CMD_DEREGISTERSUBCLUSTER, DEREGISTER_SUBCLUSTER_USAGEINFOS)
234254
// Command2: policy
235255
.put(CMD_POLICY, POLICY_USAGEINFOS)
256+
// Command3: application
257+
.put(CMD_APPLICATION, APPLICATION_USAGEINFOS)
236258
.build();
237259

238260
public RouterCLI() {

0 commit comments

Comments
 (0)