Author: yhemanth
Date: Sat Feb 28 07:18:21 2009
New Revision: 748783
URL: http://svn.apache.org/viewvc?rev=748783&view=rev
Log:
HADOOP-5146. Fixes a race condition that causes LocalDirAllocator to missfiles.
Contributed by Devaraj Das.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=748783&r1=748782&r2=748783&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Sat Feb 28 07:18:21 2009
@@ -926,7 +926,10 @@
HADOOP-5154. Fixes a deadlock in the fairshare scheduler.
(Matei Zaharia via yhemanth)
-
+
+ HADOOP-5146. Fixes a race condition that causes LocalDirAllocator to miss
+ files. (Devaraj Das via yhemanth)
+
Release 0.19.1 - Unreleased
IMPROVEMENTS
Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java?rev=748783&r1=748782&r2=748783&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java
(original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java Sat
Feb 28 07:18:21 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),