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 ac...@apache.org on 2012/07/11 18:04:26 UTC

svn commit: r1360252 - /hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/TaskLog.java

Author: acmurthy
Date: Wed Jul 11 16:04:25 2012
New Revision: 1360252

URL: http://svn.apache.org/viewvc?rev=1360252&view=rev
Log:
MAPREDUCE-3837. Fixed TaskLog to check for existence of task-attempt log directory before trying to create it.

Modified:
    hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/TaskLog.java

Modified: hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/TaskLog.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/TaskLog.java?rev=1360252&r1=1360251&r2=1360252&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/TaskLog.java (original)
+++ hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/TaskLog.java Wed Jul 11 16:04:25 2012
@@ -100,7 +100,7 @@ public class TaskLog {
     String strAttemptLogDir = getTaskAttemptLogDir(taskID, 
         cleanupSuffix, localDirs);
     File attemptLogDir = new File(strAttemptLogDir);
-    if (!attemptLogDir.mkdirs()) {
+    if (!attemptLogDir.exists() && !attemptLogDir.mkdirs()) {
       throw new IOException("Creation of " + attemptLogDir + " failed.");
     }
     String strLinkAttemptLogDir =