hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-5861) LocalContainerLauncher does not atomically update volatile variable finishedSubMaps
Date Fri, 25 Apr 2014 20:41:18 GMT
Ted Yu created MAPREDUCE-5861:
---------------------------------

             Summary: LocalContainerLauncher does not atomically update volatile variable
finishedSubMaps
                 Key: MAPREDUCE-5861
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5861
             Project: Hadoop Map/Reduce
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


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