Class HdfsFileInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.fs.ByteBufferReadable, org.apache.hadoop.fs.CanUnbuffer, org.apache.hadoop.fs.PositionedReadable, org.apache.hadoop.fs.Seekable, org.apache.hadoop.fs.StreamCapabilities

    @NotThreadSafe
    public class HdfsFileInputStream
    extends alluxio.hadoop.BaseHdfsFileInputStream
    implements org.apache.hadoop.fs.CanUnbuffer, org.apache.hadoop.fs.StreamCapabilities
    HdfsFileInputStream implement for hadoop 3. This is just a wrapper around HdfsFileInputStream with CanUnbuffer and StreamCapabilities support.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.hadoop.fs.StreamCapabilities

        org.apache.hadoop.fs.StreamCapabilities.StreamCapability
    • Field Summary

      • Fields inherited from class alluxio.hadoop.BaseHdfsFileInputStream

        mInputStream
      • Fields inherited from interface org.apache.hadoop.fs.StreamCapabilities

        ABORTABLE_STREAM, DROPBEHIND, HFLUSH, HSYNC, IOSTATISTICS, PREADBYTEBUFFER, READAHEAD, READBYTEBUFFER, UNBUFFER
    • Constructor Summary

      Constructors 
      Constructor Description
      HdfsFileInputStream​(alluxio.client.file.FileInStream inputStream, org.apache.hadoop.fs.FileSystem.Statistics stats)
      Constructs a new stream for reading a file from HDFS.
      HdfsFileInputStream​(alluxio.client.file.FileSystem fs, alluxio.AlluxioURI uri, org.apache.hadoop.fs.FileSystem.Statistics stats)
      Constructs a new stream for reading a file from HDFS.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasCapability​(java.lang.String capability)  
      void unbuffer()  
      • Methods inherited from class alluxio.hadoop.BaseHdfsFileInputStream

        available, close, getPos, read, read, read, read, read, readFully, readFully, seek, seekToNewSource, skip
      • Methods inherited from class java.io.InputStream

        mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HdfsFileInputStream

        public HdfsFileInputStream​(alluxio.client.file.FileSystem fs,
                                   alluxio.AlluxioURI uri,
                                   org.apache.hadoop.fs.FileSystem.Statistics stats)
                            throws java.io.IOException
        Constructs a new stream for reading a file from HDFS.
        Parameters:
        fs - the file system
        uri - the Alluxio file URI
        stats - filesystem statistics
        Throws:
        java.io.IOException
      • HdfsFileInputStream

        public HdfsFileInputStream​(alluxio.client.file.FileInStream inputStream,
                                   org.apache.hadoop.fs.FileSystem.Statistics stats)
        Constructs a new stream for reading a file from HDFS.
        Parameters:
        inputStream - the input stream
        stats - filesystem statistics
    • Method Detail

      • hasCapability

        public boolean hasCapability​(java.lang.String capability)
        Specified by:
        hasCapability in interface org.apache.hadoop.fs.StreamCapabilities
      • unbuffer

        public void unbuffer()
        Specified by:
        unbuffer in interface org.apache.hadoop.fs.CanUnbuffer