[
https://issues.apache.org/jira/browse/YARN-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011414#comment-16011414
]
Daryn Sharp commented on YARN-6603:
-----------------------------------
After getting the rmApp, you should replace:
{code}
RMAppAttempt appAttempt = rmApp.getAppAttempts().get(appAttemptId);
{code}
with:
{code}
RMAppAttempt appAttempt = rmApp.getAppAttempt(appAttemptdId);
{code}
The current getAppAttempts() returns an unmodifiable collection of a
non-threadsafe map which isn't useful at all. The latter uses proper
synchronization to lookup the attempt.
You may also be saddened to learn that a synchronized copy of the blacklist
hashset is created just to get the size. Bonus points for fixing that, but not
necessary.
> NPE in RMAppsBlock
> ------------------
>
> Key: YARN-6603
> URL: https://issues.apache.org/jira/browse/YARN-6603
> Project: Hadoop YARN
> Issue Type: Bug
> Components: resourcemanager
> Affects Versions: 2.8.0
> Reporter: Jason Lowe
> Assignee: Jason Lowe
> Attachments: YARN-6603.001.patch
>
>
> We are seeing an intermittent NPE when the RM is trying to render the
> /cluster URI.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]