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 "Jason Lowe (JIRA)" <ji...@apache.org> on 2017/11/07 16:15:00 UTC

[jira] [Assigned] (YARN-7454) RMAppAttemptMetrics#getAggregateResourceUsage can NPE due to double lookup

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

Jason Lowe reassigned YARN-7454:
--------------------------------

             Assignee: Jason Lowe
    Affects Version/s: 3.1.0
     Target Version/s: 3.1.0

> RMAppAttemptMetrics#getAggregateResourceUsage can NPE due to double lookup
> --------------------------------------------------------------------------
>
>                 Key: YARN-7454
>                 URL: https://issues.apache.org/jira/browse/YARN-7454
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 3.1.0
>            Reporter: Jason Lowe
>            Assignee: Jason Lowe
>            Priority: Minor
>         Attachments: YARN-7454.001.patch
>
>
> RMAppAttemptMetrics#getAggregateResourceUsage does a double-lookup on a concurrent hash map, but the app could be removed from the map between the two lookups:
> {code}
>     RMApp rmApp = rmContext.getRMApps().get(attemptId.getApplicationId());
>     if (rmApp != null) {
>       RMAppAttempt currentAttempt = rmContext.getRMApps().get(attemptId.getApplicationId()).getCurrentAppAttempt();
> {code}
> The attempt should be looked up within rmApp directly rather than redundantly trying to retrieve the RMApp first.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org