hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r686107 - in /hadoop/core/trunk: CHANGES.txt src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java
Date Fri, 15 Aug 2008 01:54:05 GMT
Author: omalley
Date: Thu Aug 14 18:54:04 2008
New Revision: 686107

URL: http://svn.apache.org/viewvc?rev=686107&view=rev
Log:
HADOOP-3946. Fix TestMapRed after hadoop-3664. (tomwhite via omalley) 
Recommitting now that I've identified the problem as being environmental.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=686107&r1=686106&r2=686107&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Aug 14 18:54:04 2008
@@ -317,6 +317,8 @@
     HADOOP-3889. Improve error reporting from HftpFileSystem, handling in
     DistCp. (Tsz Wo (Nicholas), SZE via cdouglas)
 
+    HADOOP-3946. Fix TestMapRed after hadoop-3664. (tomwhite via omalley)
+
 Release 0.18.0 - 2008-08-19
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java?rev=686107&r1=686106&r2=686107&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SequenceFileInputFormat.java Thu
Aug 14 18:54:04 2008
@@ -21,6 +21,7 @@
 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;
@@ -39,12 +40,10 @@
     for (int i = 0; i < files.length; i++) {
       FileStatus file = files[i];
       if (file.isDir()) {     // it's a MapFile
-        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));
+        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);
       }
     }
     return files;



Mime
View raw message