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

Hadoop QA commented on YARN-2761:
---------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12677844/YARN-2761.patch
  against trunk revision ec63a3f.

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
                        Please justify why no new tests are needed for this 
patch.
                        Also please list what manual steps were performed to 
verify this patch.

    {color:red}-1 javac{color:red}.  The patch appears to cause the build to 
fail.

Console output: https://builds.apache.org/job/PreCommit-YARN-Build/5622//console

This message is automatically generated.

> potential race condition in SchedulingPolicy
> --------------------------------------------
>
>                 Key: YARN-2761
>                 URL: https://issues.apache.org/jira/browse/YARN-2761
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>            Reporter: Hong Zhiguo
>            Assignee: Hong Zhiguo
>            Priority: Minor
>         Attachments: YARN-2761.patch
>
>
> reported by findbug. 
> In SchedulingPolicy.getInstance, ConcurrentHashMap.get and 
> ConcurrentHashMap.put is called. These two operations together should be 
> atomic, but using ConcurrentHashMap doesn't guarantee this. 
> {code} 
> public static SchedulingPolicy getInstance(Class<? extends  SchedulingPolicy> 
> clazz) { 
>   SchedulingPolicy policy = instances.get(clazz); 
>   if (policy == null) { 
>     policy = ReflectionUtils.newInstance(clazz, null); 
>    instances.put(clazz, policy); 
>   } 
>   return policy; 
> } 
> {code}



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

Reply via email to