hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-3976) Catch ApplicationNotFoundException instead of parent YarnException in YarnClient and AppReportFetcher
Date Fri, 24 Jul 2015 20:54:06 GMT

     [ https://issues.apache.org/jira/browse/YARN-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jason Lowe updated YARN-3976:
-----------------------------
    Target Version/s: 2.8.0  (was: 2.7.2)
            Priority: Trivial  (was: Major)

This is a trivial code cleanup and not really a bugfix, so moving out of the 2.7.2 release
to reduce code churn on that patch release.

> Catch ApplicationNotFoundException instead of parent YarnException in YarnClient and
AppReportFetcher
> -----------------------------------------------------------------------------------------------------
>
>                 Key: YARN-3976
>                 URL: https://issues.apache.org/jira/browse/YARN-3976
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.7.1
>            Reporter: Mit Desai
>            Assignee: Mit Desai
>            Priority: Trivial
>
> It's is better to catch the ApplicationNotFoundException rather than the parent YarnException
and rethrow it when it's not ApplicationNotFoundExcepton
> {noformat}
>  catch (YarnException e) {
>       if (!historyServiceEnabled) {
>         // Just throw it as usual if historyService is not enabled.
>         throw e;
>       }
>       // Even if history-service is enabled, treat all exceptions still the same
>       // except the following
>       if (!(e.getClass() == ApplicationNotFoundException.class)) {
>         throw e;
>       }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message