hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Junping Du (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAPREDUCE-5861) finishedSubMaps field in LocalContainerLauncher does not need to be volatile
Date Fri, 16 May 2014 11:22:21 GMT

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

Junping Du updated MAPREDUCE-5861:
----------------------------------

    Issue Type: Improvement  (was: Bug)

> finishedSubMaps field in LocalContainerLauncher does not need to be volatile
> ----------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5861
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5861
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee: Tsuyoshi OZAWA
>            Priority: Minor
>         Attachments: MAPREDUCE-5861.1.patch, MAPREDUCE-5861.2.patch
>
>
> Around line 374:
> {code}
>           if (++finishedSubMaps == numMapTasks) {
>             doneWithMaps = true;
>           }
> {code}
> The increment of finishedSubMaps is not atomic.
> See the answer to http://stackoverflow.com/questions/9749746/what-is-the-difference-of-atomic-volatile-synchronize
.
> AtomicInteger can be used to achieve atomicity.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message