Przeglądaj źródła

HADOOP-879. Fix InputFormatBase to again handle output generated by MapFileOutputFormat.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@495001 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 lat temu
rodzic
commit
e910e3cbab

+ 3 - 0
CHANGES.txt

@@ -39,6 +39,9 @@ Trunk (unreleased changes)
 12. HADOOP-880.  Fix S3 FileSystem to remove directories.
     (Tom White via cutting)
 
+13. HADOOP-879.  Fix InputFormatBase to handle output generated by
+    MapFileOutputFormat.  (cutting)
+
 
 Release 0.10.0 - 2007-01-05
 

+ 2 - 2
src/java/org/apache/hadoop/mapred/InputFormatBase.java

@@ -108,9 +108,9 @@ public abstract class InputFormatBase implements InputFormat {
         // while generating splits
         for (Path subPath : fs.listPaths(p, hiddenFileFilter)) {
           FileSystem subFS = subPath.getFileSystem(job); 
-          if (!subFS.isFile(subPath)) {
+          if (!subFS.exists(subPath)) {
             result.add(new IOException(
-                "Input path is not a file : " + subPath)); 
+                "Input path does not exist: " + subPath)); 
           } else {
             totalFiles++; 
           }

+ 1 - 1
src/test/org/apache/hadoop/mapred/TestMapRed.java

@@ -455,7 +455,7 @@ public class TestMapRed extends TestCase {
         checkJob.setOutputPath(intermediateOuts);
         checkJob.setOutputKeyClass(IntWritable.class);
         checkJob.setOutputValueClass(IntWritable.class);
-        checkJob.setOutputFormat(SequenceFileOutputFormat.class);
+        checkJob.setOutputFormat(MapFileOutputFormat.class);
         checkJob.setReducerClass(RandomCheckReducer.class);
         checkJob.setNumReduceTasks(intermediateReduces);