hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1360252 - /hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/TaskLog.java
Date Wed, 11 Jul 2012 16:04:26 GMT
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 = 



Mime
View raw message