hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4371) "yarn application -kill" should take multiple application ids
Date Tue, 12 Jan 2016 14:51:39 GMT

    [ https://issues.apache.org/jira/browse/YARN-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15093996#comment-15093996

Sunil G commented on YARN-4371:

Yes, I missed about below code.

+    // If one or all applications are not found, throw back exception
+    // to return proper error code.
+    if (reportFailure) {
+      throw new ApplicationNotFoundException("Application doesn't exist in RM.");
+    }

Existing {{killApplication}} has the capability to throw exception if app s not found. And
I have kept same code, so we will still print application not found exception correctly in
console with app Ids. However, there can be cases when all apps which are given to kill are
not present in RM. So console will print the error as we already have it. But we also need
to send back a non-zero error code. For tht, I am rethrowing exception to return proper error
code in a FULL error scenario. In partial success cases, we will return 0/

I could return back error code rather than throwing one again. But we need to have more if
check in below parser code. So the dummy message is only to handle errorCode.
    } else if (cliParser.hasOption(KILL_CMD)) {
      if (args.length < 3) {
        printUsage(title, opts);
        return exitCode;
      } catch (ApplicationNotFoundException e) {
        return exitCode;

> "yarn application -kill" should take multiple application ids
> -------------------------------------------------------------
>                 Key: YARN-4371
>                 URL: https://issues.apache.org/jira/browse/YARN-4371
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Tsuyoshi Ozawa
>            Assignee: Sunil G
>         Attachments: 0001-YARN-4371.patch, 0002-YARN-4371.patch, 0003-YARN-4371.patch
> Currently we cannot pass multiple applications to "yarn application -kill" command. The
command should take multiple application ids at the same time. 
> Each entries should be separated with whitespace like:
> {code}
> yarn application -kill application_1234_0001 application_1234_0007 application_1234_0012
> {code}

This message was sent by Atlassian JIRA

View raw message