diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 3b8749d379..88652df971 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -194,6 +194,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 diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java index a21b3d5b28..6425144b6b 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/LocalContainerLauncher.java @@ -177,8 +177,10 @@ public void handle(ContainerLauncherEvent event) { */ 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> futures = new ConcurrentHashMap>();