浏览代码

HADOOP-4500. Fix MultiFileSplit to get the FileSystem from the relevant
path rather than the JobClient. (Joydeep Sen Sarma via dhruba)



git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19@713782 13f79535-47bb-0310-9956-ffa450edef68

Dhruba Borthakur 16 年之前
父节点
当前提交
3099d4e23c
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 3 0
      CHANGES.txt
  2. 1 2
      src/mapred/org/apache/hadoop/mapred/MultiFileSplit.java

+ 3 - 0
CHANGES.txt

@@ -976,6 +976,9 @@ Release 0.19.0 - Unreleased
     HADOOP-4471. Sort running jobs by priority in the capacity scheduler.
     (Amar Kamat via yhemanth) 
 
+    HADOOP-4500. Fix MultiFileSplit to get the FileSystem from the relevant
+    path rather than the JobClient. (Joydeep Sen Sarma via dhruba)
+
 Release 0.18.3 - Unreleased
 
   BUG FIXES

+ 1 - 2
src/mapred/org/apache/hadoop/mapred/MultiFileSplit.java

@@ -90,9 +90,8 @@ public class MultiFileSplit implements InputSplit {
 
   public String[] getLocations() throws IOException {
     HashSet<String> hostSet = new HashSet<String>();
-    JobClient jClient = new JobClient(job);
-    FileSystem fs = jClient.getFs();
     for (Path file : paths) {
+      FileSystem fs = file.getFileSystem(job);
       FileStatus status = fs.getFileStatus(file);
       BlockLocation[] blkLocations = fs.getFileBlockLocations(status,
                                           0, status.getLen());