You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/08/19 20:27:44 UTC

svn commit: r1159732 - in /hadoop/common/branches/branch-0.20-security: CHANGES.txt src/mapred/org/apache/hadoop/mapred/TaskLog.java

Author: omalley
Date: Fri Aug 19 18:27:43 2011
New Revision: 1159732

URL: http://svn.apache.org/viewvc?rev=1159732&view=rev
Log:
MAPREDUCE-2846. Fixed a race condition in writing the log index file that
caused tasks to fail. (omalley)

Modified:
    hadoop/common/branches/branch-0.20-security/CHANGES.txt   (contents, props changed)
    hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskLog.java

Modified: hadoop/common/branches/branch-0.20-security/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/CHANGES.txt?rev=1159732&r1=1159731&r2=1159732&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security/CHANGES.txt Fri Aug 19 18:27:43 2011
@@ -16,9 +16,6 @@ Release 0.20.205.0 - unreleased
     MAPREDUCE-2729. Ensure jobs with reduces which can't be launched due to
     slow-start do not count for user-limits. (Sherry Chen via acmurthy) 
 
-    MAPREDUCE-2651. Fix race condition in Linux task controller for
-    job log directory creation. (Bharath Mundlapudi via llu)
-
     HADOOP-6833. IPC leaks call parameters when exceptions thrown.
     (Todd Lipcon via eli)
   
@@ -92,6 +89,12 @@ Release 0.20.204.0 - unreleased
 
   BUG FIXES
 
+    MAPREDUCE-2846. Fixed a race condition in writing the log index file that
+    caused tasks to fail. (omalley)
+
+    MAPREDUCE-2651. Fix race condition in Linux task controller for
+    job log directory creation. (Bharath Mundlapudi via llu)
+
     MAPREDUCE-2621. TestCapacityScheduler fails with "Queue "q1" does not 
     exist". (Sherry Chen via mahadev)
 

Propchange: hadoop/common/branches/branch-0.20-security/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 19 18:27:43 2011
@@ -1,6 +1,6 @@
 /hadoop/common/branches/branch-0.20/CHANGES.txt:826138,826568,829987,831184,833001,880632,898713,909245,909723,960946,990003,1044225
 /hadoop/common/branches/branch-0.20-security-203/CHANGES.txt:1096071,1097011,1097249,1097269,1097281,1097966,1098816,1098819,1098823,1098827,1098832,1098839,1098854,1098863,1099088,1099191,1099324,1099330,1099333,1102071,1128115
-/hadoop/common/branches/branch-0.20-security-204/CHANGES.txt:1128390,1147228,1148069,1149316,1154413
+/hadoop/common/branches/branch-0.20-security-204/CHANGES.txt:1128390,1147228,1148069,1149316,1154413,1159730
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
 /hadoop/core/trunk/CHANGES.txt:727001,727117,727191,727212,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,735082,736426,738602,738697,739416,740077,740157,741703,741762,743296,743745,743816,743892,744894,745180,745268,746010,746193,746206,746227,746233,746274,746902-746903,746925,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752514,752555,752590,752609,752834,752836,752913,752932,753112-753113,753346,754645,754847,754927,755035,755226,755348,755370,755418,755426,755790,755905,755938,755986,755998,756352,757448,757624,757849,758156,758180,759398,759932,760502,760783,761046,761482,761632,762216,762879,763107,763502,764967,765016,765809,765951,771607,772844,772876,772884,772920,773889,776638,778962,778966,779893,781720,784661,785046,785569

Modified: hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskLog.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskLog.java?rev=1159732&r1=1159731&r2=1159732&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskLog.java (original)
+++ hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskLog.java Fri Aug 19 18:27:43 2011
@@ -305,9 +305,11 @@ public class TaskLog {
     }
   }
   
-  static void writeToIndexFile(String logLocation,
-      TaskAttemptID currentTaskid, boolean isCleanup,
-      Map<LogName, Long[]> lengths) throws IOException {
+  static synchronized 
+  void writeToIndexFile(String logLocation,
+                        TaskAttemptID currentTaskid, 
+                        boolean isCleanup,
+                        Map<LogName, Long[]> lengths) throws IOException {
     // To ensure atomicity of updates to index file, write to temporary index
     // file first and then rename.
     File tmpIndexFile = getTmpIndexFile(currentTaskid, isCleanup);