You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Jian He (JIRA)" <ji...@apache.org> on 2014/05/06 20:15:41 UTC

[jira] [Commented] (YARN-2025) Possible NPE in schedulers#addApplicationAttempt()

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

Jian He commented on YARN-2025:
-------------------------------

Hi [~ozawa],  I think attempt will not be added to scheduler if AppKilledTransition is called.  Basically, addApplicationAttempt() will not be invoked if AppKilledTransition is called. 
There's a separate KillAttemptTransition which waits until the attempt is removed (if there's an attempt).

> Possible NPE in schedulers#addApplicationAttempt()
> --------------------------------------------------
>
>                 Key: YARN-2025
>                 URL: https://issues.apache.org/jira/browse/YARN-2025
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Tsuyoshi OZAWA
>            Assignee: Tsuyoshi OZAWA
>         Attachments: YARN-2025.1.patch
>
>
> In FifoScheduler/FairScheduler/CapacityScheduler#addApplicationAttempt(), we don't check whether {{application}} is null. This can cause NPE in following sequences: addApplication() -> doneApplication() (e.g. AppKilledTransition) -> addApplicationAttempt().
> {code}
>     SchedulerApplication application =
>         applications.get(applicationAttemptId.getApplicationId());
>     String user = application.getUser();
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)