Merge r1594795 from trunk: MAPREDUCE-5861. finishedSubMaps field in LocalContainerLauncher does not need to be volatile. (Contributed by Tsuyoshi OZAWA)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1594797 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
44ef591ff0
commit
6d3bfa33c9
|
@ -55,6 +55,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
MAPREDUCE-5652. NM Recovery. ShuffleHandler should handle NM restarts.
|
MAPREDUCE-5652. NM Recovery. ShuffleHandler should handle NM restarts.
|
||||||
(Jason Lowe via kasha)
|
(Jason Lowe via kasha)
|
||||||
|
|
||||||
|
MAPREDUCE-5861. finishedSubMaps field in LocalContainerLauncher does not
|
||||||
|
need to be volatile. (Tsuyoshi OZAWA via junping_du)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -177,8 +177,10 @@ public class LocalContainerLauncher extends AbstractService implements
|
||||||
*/
|
*/
|
||||||
private class EventHandler implements Runnable {
|
private class EventHandler implements Runnable {
|
||||||
|
|
||||||
private volatile boolean doneWithMaps = false;
|
// doneWithMaps and finishedSubMaps are accessed from only
|
||||||
private volatile int finishedSubMaps = 0;
|
// one thread. Therefore, no need to make them volatile.
|
||||||
|
private boolean doneWithMaps = false;
|
||||||
|
private int finishedSubMaps = 0;
|
||||||
|
|
||||||
private final Map<TaskAttemptId,Future<?>> futures =
|
private final Map<TaskAttemptId,Future<?>> futures =
|
||||||
new ConcurrentHashMap<TaskAttemptId,Future<?>>();
|
new ConcurrentHashMap<TaskAttemptId,Future<?>>();
|
||||||
|
|
Loading…
Reference in New Issue