Browse Source

HADOOP-3946. Rollback patch.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@685693 13f79535-47bb-0310-9956-ffa450edef68
Owen O'Malley 17 years ago
parent
commit
ba07783531
2 changed files with 6 additions and 7 deletions
  1. 0 2
      CHANGES.txt
  2. 6 5
      src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java

+ 0 - 2
CHANGES.txt

@@ -298,8 +298,6 @@ Trunk (unreleased changes)
     HADOOP-3773. Change Pipes to set the default map output key and value 
     types correctly. (Koji Noguchi via omalley)
 
-    HADOOP-3946. Fix TestMapRed after hadoop-3664. (tomwhite via omalley)
-
 Release 0.18.0 - Unreleased
 
   INCOMPATIBLE CHANGES

+ 6 - 5
src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java

@@ -21,7 +21,6 @@ package org.apache.hadoop.mapred;
 import java.io.IOException;
 
 import org.apache.hadoop.fs.FileStatus;
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
 import org.apache.hadoop.io.SequenceFile;
@@ -40,10 +39,12 @@ public class SequenceFileInputFormat<K, V> extends FileInputFormat<K, V> {
     for (int i = 0; i < files.length; i++) {
       FileStatus file = files[i];
       if (file.isDir()) {     // it's a MapFile
-        Path dataFile = new Path(file.getPath(), MapFile.DATA_FILE_NAME);
-        FileSystem fs = file.getPath().getFileSystem(job);
-        // use the data file
-        files[i] = fs.getFileStatus(dataFile);
+        files[i] = new FileStatus(file.getLen(), file.isDir(), 
+            file.getReplication(), file.getBlockSize(),
+            file.getModificationTime(), file.getPermission(),
+            file.getOwner(), file.getGroup(),
+            // use the data file
+            new Path(file.getPath(), MapFile.DATA_FILE_NAME));
       }
     }
     return files;