|
@@ -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 InputStream {
|
|
|
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) {
|