hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1392182 - /hadoop/common/branches/branch-1.1/src/mapred/org/apache/hadoop/mapred/IFileInputStream.java
Date Mon, 01 Oct 2012 03:23:06 GMT
Author: mattf
Date: Mon Oct  1 03:23:06 2012
New Revision: 1392182

URL: http://svn.apache.org/viewvc?rev=1392182&view=rev
Log:
minor tweak to patch for MAPREDUCE-4511 (Add IFile readahead) to avoid use of interface HasFileDescriptor,
which doesn't exist until 1.2

Modified:
    hadoop/common/branches/branch-1.1/src/mapred/org/apache/hadoop/mapred/IFileInputStream.java

Modified: hadoop/common/branches/branch-1.1/src/mapred/org/apache/hadoop/mapred/IFileInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.1/src/mapred/org/apache/hadoop/mapred/IFileInputStream.java?rev=1392182&r1=1392181&r2=1392182&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.1/src/mapred/org/apache/hadoop/mapred/IFileInputStream.java
(original)
+++ hadoop/common/branches/branch-1.1/src/mapred/org/apache/hadoop/mapred/IFileInputStream.java
Mon Oct  1 03:23:06 2012
@@ -29,7 +29,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.ChecksumException;
 import org.apache.hadoop.fs.FSDataInputStream;
-import org.apache.hadoop.fs.HasFileDescriptor;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.io.ReadaheadPool;
 import org.apache.hadoop.io.ReadaheadPool.ReadaheadRequest;
@@ -101,9 +100,7 @@ class IFileInputStream extends InputStre
   private static FileDescriptor getFileDescriptorIfAvail(InputStream in) {
     FileDescriptor fd = null;
     try {
-      if (in instanceof HasFileDescriptor) {
-        fd = ((HasFileDescriptor)in).getFileDescriptor();
-      } else if (in instanceof FileInputStream) {
+      if (in instanceof FileInputStream) {
         fd = ((FileInputStream)in).getFD();
       }
     } catch (IOException e) {



Mime
View raw message