Bläddra i källkod

Fix a bug in the fix for HADOOP-278. Input directories should be
checked against the job's filesystem, not the jobtracker's.
Contributed by Owen.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@417295 13f79535-47bb-0310-9956-ffa450edef68

Doug Cutting 19 år sedan
förälder
incheckning
9c30db870a
1 ändrade filer med 4 tillägg och 3 borttagningar
  1. 4 3
      src/java/org/apache/hadoop/mapred/JobClient.java

+ 4 - 3
src/java/org/apache/hadoop/mapred/JobClient.java

@@ -242,7 +242,6 @@ public class JobClient implements MRConstants {
 
         String originalJarPath = job.getJar();
 
-        FileSystem localFs = FileSystem.getNamed("local", job);
         FileSystem fs = getFs();
 
         short replication = (short)job.getInt("mapred.submit.replication", 10);
@@ -260,12 +259,14 @@ public class JobClient implements MRConstants {
           job.setWorkingDirectory(fs.getWorkingDirectory());          
         }
 
+        FileSystem userFileSys = FileSystem.get(job);
         Path[] inputDirs = job.getInputPaths();
         boolean[] validDirs = 
-          job.getInputFormat().areValidInputDirectories(fs, inputDirs);
+          job.getInputFormat().areValidInputDirectories(userFileSys, inputDirs);
         for(int i=0; i < validDirs.length; ++i) {
           if (!validDirs[i]) {
-            String msg = "Input directory " + inputDirs[i] + " is invalid.";
+            String msg = "Input directory " + inputDirs[i] + 
+                         " in " + userFileSys.getName() + " is invalid.";
             LOG.error(msg);
             throw new IOException(msg);
           }