hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junping...@apache.org
Subject svn commit: r1594797 - in /hadoop/common/branches/branch-2/hadoop-mapreduce-project: CHANGES.txt hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java
Date Thu, 15 May 2014 07:10:43 GMT
Author: junping_du
Date: Thu May 15 07:10:42 2014
New Revision: 1594797

URL: http://svn.apache.org/r1594797
Log:
Merge r1594795 from trunk: MAPREDUCE-5861. finishedSubMaps field in LocalContainerLauncher
does not need to be volatile. (Contributed by Tsuyoshi OZAWA)

Modified:
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt?rev=1594797&r1=1594796&r2=1594797&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt Thu May 15 07:10:42
2014
@@ -55,6 +55,9 @@ Release 2.5.0 - UNRELEASED
     MAPREDUCE-5652. NM Recovery. ShuffleHandler should handle NM restarts.
     (Jason Lowe via kasha)
 
+    MAPREDUCE-5861. finishedSubMaps field in LocalContainerLauncher does not 
+    need to be volatile. (Tsuyoshi OZAWA via junping_du)
+
   OPTIMIZATIONS
 
   BUG FIXES 

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java?rev=1594797&r1=1594796&r2=1594797&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java
Thu May 15 07:10:42 2014
@@ -177,8 +177,10 @@ public class LocalContainerLauncher exte
    */
   private class EventHandler implements Runnable {
 
-    private volatile boolean doneWithMaps = false;
-    private volatile int finishedSubMaps = 0;
+    // doneWithMaps and finishedSubMaps are accessed from only
+    // one thread. Therefore, no need to make them volatile.
+    private boolean doneWithMaps = false;
+    private int finishedSubMaps = 0;
 
     private final Map<TaskAttemptId,Future<?>> futures =
         new ConcurrentHashMap<TaskAttemptId,Future<?>>();



Mime
View raw message