Procházet zdrojové kódy

MAPREDUCE-3837. Fixed TaskLog to check for existence of task-attempt log directory before trying to create it.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1360252 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy před 13 roky
rodič
revize
abb14cc2c8

+ 1 - 1
src/mapred/org/apache/hadoop/mapred/TaskLog.java

@@ -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 =