Explorar o código

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 %!s(int64=13) %!d(string=hai) anos
pai
achega
abb14cc2c8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/mapred/org/apache/hadoop/mapred/TaskLog.java

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

@@ -100,7 +100,7 @@ public class TaskLog {
     String strAttemptLogDir = getTaskAttemptLogDir(taskID, 
     String strAttemptLogDir = getTaskAttemptLogDir(taskID, 
         cleanupSuffix, localDirs);
         cleanupSuffix, localDirs);
     File attemptLogDir = new File(strAttemptLogDir);
     File attemptLogDir = new File(strAttemptLogDir);
-    if (!attemptLogDir.mkdirs()) {
+    if (!attemptLogDir.exists() && !attemptLogDir.mkdirs()) {
       throw new IOException("Creation of " + attemptLogDir + " failed.");
       throw new IOException("Creation of " + attemptLogDir + " failed.");
     }
     }
     String strLinkAttemptLogDir = 
     String strLinkAttemptLogDir =