浏览代码

HADOOP-3440. Fixes DistributedCache to not create symlinks for paths which don't have fragments even when createSymLink is true. Contributed by Abhijit Bagri.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@664097 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 17 年之前
父节点
当前提交
553c3df870
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 4 0
      CHANGES.txt
  2. 3 0
      src/java/org/apache/hadoop/filecache/DistributedCache.java

+ 4 - 0
CHANGES.txt

@@ -504,6 +504,10 @@ Trunk (unreleased changes)
     HADOOP-3503. Fix a race condition when client and namenode start simultaneous
     recovery of the same block.  (dhruba & Tsz Wo (Nicholas), SZE)
 
+    HADOOP-3440. Fixes DistributedCache to not create symlinks for paths which
+    don't have fragments even when createSymLink is true. 
+    (Abhijit Bagri via ddas) 
+
 Release 0.17.0 - 2008-05-18
 
   INCOMPATIBLE CHANGES

+ 3 - 0
src/java/org/apache/hadoop/filecache/DistributedCache.java

@@ -297,6 +297,9 @@ public class DistributedCache {
                                     Path currentWorkDir) 
   throws IOException {
     boolean doSymlink = getSymlink(conf);
+    if(cache.getFragment() == null) {
+    	doSymlink = false;
+    }
     FileSystem fs = getFileSystem(cache, conf);
     String link = currentWorkDir.toString() + Path.SEPARATOR + cache.getFragment();
     File flink = new File(link);