hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2761) potential race condition in SchedulingPolicy
Date Sat, 02 May 2015 05:05:09 GMT

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

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

\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:red}-1{color} | patch |   0m  0s | The patch command could not apply the patch during
dryrun. |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | http://issues.apache.org/jira/secure/attachment/12677844/YARN-2761.patch |
| Optional Tests | javadoc javac unit findbugs checkstyle |
| git revision | trunk / f1a152c |
| Console output | https://builds.apache.org/job/PreCommit-YARN-Build/7637/console |


This message was 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)

Mime
View raw message