hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhema...@apache.org
Subject svn commit: r748785 - in /hadoop/core/branches/branch-0.19: CHANGES.txt src/mapred/org/apache/hadoop/mapred/TaskRunner.java
Date Sat, 28 Feb 2009 07:25:58 GMT
Author: yhemanth
Date: Sat Feb 28 07:25:58 2009
New Revision: 748785

URL: http://svn.apache.org/viewvc?rev=748785&view=rev
Log:
HADOOP-5146. Fixes a race condition that causes LocalDirAllocator to miss files. Contributed
by Devaraj Das.

Modified:
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskRunner.java

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=748785&r1=748784&r2=748785&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Sat Feb 28 07:25:58 2009
@@ -29,6 +29,9 @@
     job is not in memory and a tasktracker comes to the jobtracker with a status
     report of a task belonging to that job. (Amar Kamat via ddas)
 
+    HADOOP-5146. Fixes a race condition that causes LocalDirAllocator to miss
+    files.  (Devaraj Das via yhemanth)
+
 Release 0.19.1 - 2009-02-23
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskRunner.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskRunner.java?rev=748785&r1=748784&r2=748785&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskRunner.java (original)
+++ hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/TaskRunner.java Sat
Feb 28 07:25:58 2009
@@ -139,13 +139,9 @@
             String cacheId = DistributedCache.makeRelative(archives[i],conf);
             String cachePath = TaskTracker.getCacheSubdir() + 
                                  Path.SEPARATOR + cacheId;
-            if (lDirAlloc.ifExists(cachePath, conf)) {
-              localPath =  lDirAlloc.getLocalPathToRead(cachePath, conf);
-            }
-            else {
-              localPath = lDirAlloc.getLocalPathForWrite(cachePath,
+            
+            localPath = lDirAlloc.getLocalPathForWrite(cachePath,
                                       fileStatus.getLen(), conf);
-            }
             baseDir = localPath.toString().replace(cacheId, "");
             p[i] = DistributedCache.getLocalCache(archives[i], conf, 
                                                   new Path(baseDir),
@@ -169,12 +165,9 @@
             String cacheId = DistributedCache.makeRelative(files[i], conf);
             String cachePath = TaskTracker.getCacheSubdir() +
                                  Path.SEPARATOR + cacheId;
-            if (lDirAlloc.ifExists(cachePath,conf)) {
-              localPath =  lDirAlloc.getLocalPathToRead(cachePath, conf);
-            } else {
-              localPath = lDirAlloc.getLocalPathForWrite(cachePath,
+            
+            localPath = lDirAlloc.getLocalPathForWrite(cachePath,
                                       fileStatus.getLen(), conf);
-            }
             baseDir = localPath.toString().replace(cacheId, "");
             p[i] = DistributedCache.getLocalCache(files[i], conf, 
                                                   new Path(baseDir),



Mime
View raw message