diff --git a/hadoop-mapreduce/CHANGES.txt b/hadoop-mapreduce/CHANGES.txt index 1f719ab1071..57c44cf1f5c 100644 --- a/hadoop-mapreduce/CHANGES.txt +++ b/hadoop-mapreduce/CHANGES.txt @@ -1133,7 +1133,10 @@ Trunk (unreleased changes) MAPREDUCE-2838. Fix MapReduce builds to use new hadoop-common test jars. (gkesavan via acmurthy) - MAPREDUCE-2859 - Fix eclipse plugin contrib module compilation (gkesavan) + MAPREDUCE-2859. Fix eclipse plugin contrib module compilation (gkesavan) + + MAPREDUCE-2846. Fix missing synchronization in the task log management. + (omalley) Release 0.22.0 - Unreleased diff --git a/hadoop-mapreduce/hadoop-mr-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java b/hadoop-mapreduce/hadoop-mr-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java index 810eea3a413..7e978e9cf94 100644 --- a/hadoop-mapreduce/hadoop-mr-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java +++ b/hadoop-mapreduce/hadoop-mr-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java @@ -183,9 +183,9 @@ public class TaskLog { private static long prevErrLength; private static long prevLogLength; - private static void writeToIndexFile(String logLocation, - boolean isCleanup) - throws IOException { + private static synchronized + void writeToIndexFile(String logLocation, + boolean isCleanup) throws IOException { // To ensure atomicity of updates to index file, write to temporary index // file first and then rename. File tmpIndexFile = getTmpIndexFile(currentTaskid, isCleanup);