MAPREDUCE-2846. Fix missing synchronization in the task log management.

(omalley)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1161324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Owen O'Malley 2011-08-24 23:52:08 +00:00
parent fdae3cda85
commit ebf61db566
2 changed files with 7 additions and 4 deletions

View File

@ -1133,7 +1133,10 @@ Trunk (unreleased changes)
MAPREDUCE-2838. Fix MapReduce builds to use new hadoop-common test jars. MAPREDUCE-2838. Fix MapReduce builds to use new hadoop-common test jars.
(gkesavan via acmurthy) (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 Release 0.22.0 - Unreleased

View File

@ -183,9 +183,9 @@ public class TaskLog {
private static long prevErrLength; private static long prevErrLength;
private static long prevLogLength; private static long prevLogLength;
private static void writeToIndexFile(String logLocation, private static synchronized
boolean isCleanup) void writeToIndexFile(String logLocation,
throws IOException { boolean isCleanup) throws IOException {
// To ensure atomicity of updates to index file, write to temporary index // To ensure atomicity of updates to index file, write to temporary index
// file first and then rename. // file first and then rename.
File tmpIndexFile = getTmpIndexFile(currentTaskid, isCleanup); File tmpIndexFile = getTmpIndexFile(currentTaskid, isCleanup);