hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Saxena (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2938) Fix new findbugs warnings in hadoop-yarn-resourcemanager and hadoop-yarn-applicationhistoryservice
Date Fri, 12 Dec 2014 05:48:13 GMT

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

Varun Saxena commented on YARN-2938:
------------------------------------

bq. After the change, the method will always create a policy obj, right? However, before the
change, the policy obj is only created when it is not in instances.
Yes, it will be created but then findbugs complained about instances#get and instances#put
not being thread safe. instances is of type ConcurrentHashMap. Hence I first created policy
object and then called instance#putIfAbsent. As I see, there is no additional way to fix this
except making this block of code or the method synchronized.

> Fix new findbugs warnings in hadoop-yarn-resourcemanager and hadoop-yarn-applicationhistoryservice
> --------------------------------------------------------------------------------------------------
>
>                 Key: YARN-2938
>                 URL: https://issues.apache.org/jira/browse/YARN-2938
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>             Fix For: 2.7.0
>
>         Attachments: YARN-2938.001.patch, YARN-2938.002.patch
>
>




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

Mime
View raw message