org.apache.hadoop.fs.HasFileDescriptor Java Examples
The following examples show how to use
org.apache.hadoop.fs.HasFileDescriptor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IFileInputStream.java From hadoop with Apache License 2.0 | 5 votes |
private static FileDescriptor getFileDescriptorIfAvail(InputStream in) { FileDescriptor fd = null; try { if (in instanceof HasFileDescriptor) { fd = ((HasFileDescriptor)in).getFileDescriptor(); } else if (in instanceof FileInputStream) { fd = ((FileInputStream)in).getFD(); } } catch (IOException e) { LOG.info("Unable to determine FileDescriptor", e); } return fd; }
Example #2
Source File: CryptoInputStream.java From hadoop with Apache License 2.0 | 5 votes |
@Override public FileDescriptor getFileDescriptor() throws IOException { if (in instanceof HasFileDescriptor) { return ((HasFileDescriptor) in).getFileDescriptor(); } else if (in instanceof FileInputStream) { return ((FileInputStream) in).getFD(); } else { return null; } }
Example #3
Source File: IFileInputStream.java From big-c with Apache License 2.0 | 5 votes |
private static FileDescriptor getFileDescriptorIfAvail(InputStream in) { FileDescriptor fd = null; try { if (in instanceof HasFileDescriptor) { fd = ((HasFileDescriptor)in).getFileDescriptor(); } else if (in instanceof FileInputStream) { fd = ((FileInputStream)in).getFD(); } } catch (IOException e) { LOG.info("Unable to determine FileDescriptor", e); } return fd; }
Example #4
Source File: CryptoInputStream.java From big-c with Apache License 2.0 | 5 votes |
@Override public FileDescriptor getFileDescriptor() throws IOException { if (in instanceof HasFileDescriptor) { return ((HasFileDescriptor) in).getFileDescriptor(); } else if (in instanceof FileInputStream) { return ((FileInputStream) in).getFD(); } else { return null; } }
Example #5
Source File: IFileInputStream.java From incubator-tez with Apache License 2.0 | 5 votes |
private static FileDescriptor getFileDescriptorIfAvail(InputStream in) { FileDescriptor fd = null; try { if (in instanceof HasFileDescriptor) { fd = ((HasFileDescriptor)in).getFileDescriptor(); } else if (in instanceof FileInputStream) { fd = ((FileInputStream)in).getFD(); } } catch (IOException e) { LOG.info("Unable to determine FileDescriptor", e); } return fd; }
Example #6
Source File: IFileInputStream.java From tez with Apache License 2.0 | 5 votes |
private static FileDescriptor getFileDescriptorIfAvail(InputStream in) { FileDescriptor fd = null; try { if (in instanceof HasFileDescriptor) { fd = ((HasFileDescriptor)in).getFileDescriptor(); } else if (in instanceof FileInputStream) { fd = ((FileInputStream)in).getFD(); } } catch (IOException e) { LOG.info("Unable to determine FileDescriptor", e); } return fd; }