Browse Source

reverting -r1392179, missed a needed line in the changelist

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.1@1392180 13f79535-47bb-0310-9956-ffa450edef68
Matthew Foley 12 years ago
parent
commit
9ab74f85fb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/mapred/org/apache/hadoop/mapred/IFileInputStream.java

+ 3 - 1
src/mapred/org/apache/hadoop/mapred/IFileInputStream.java

@@ -101,7 +101,9 @@ class IFileInputStream extends InputStream {
   private static FileDescriptor getFileDescriptorIfAvail(InputStream in) {
     FileDescriptor fd = null;
     try {
-      if (in instanceof FileInputStream) {
+      if (in instanceof HasFileDescriptor) {
+        fd = ((HasFileDescriptor)in).getFileDescriptor();
+      } else if (in instanceof FileInputStream) {
         fd = ((FileInputStream)in).getFD();
       }
     } catch (IOException e) {