Class DrillFSDataInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
org.apache.hadoop.fs.FSDataInputStream
org.apache.drill.exec.store.dfs.DrillFSDataInputStream
All Implemented Interfaces:
Closeable, DataInput, AutoCloseable, org.apache.hadoop.fs.ByteBufferReadable, org.apache.hadoop.fs.CanSetDropBehind, org.apache.hadoop.fs.CanSetReadahead, org.apache.hadoop.fs.CanUnbuffer, org.apache.hadoop.fs.HasEnhancedByteBufferAccess, org.apache.hadoop.fs.HasFileDescriptor, org.apache.hadoop.fs.PositionedReadable, org.apache.hadoop.fs.Seekable, org.apache.hadoop.fs.StreamCapabilities

public class DrillFSDataInputStream extends org.apache.hadoop.fs.FSDataInputStream
Wrapper around FSDataInputStream to collect IO Stats.
  • Constructor Details

    • DrillFSDataInputStream

      public DrillFSDataInputStream(org.apache.hadoop.fs.FSDataInputStream in, OperatorStats operatorStats)
    • DrillFSDataInputStream

      public DrillFSDataInputStream(org.apache.hadoop.fs.FSDataInputStream in, OperatorStats operatorStats, OpenFileTracker openFileTracker)
  • Method Details

    • seek

      public void seek(long desired) throws IOException
      Specified by:
      seek in interface org.apache.hadoop.fs.Seekable
      Overrides:
      seek in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • getPos

      public long getPos() throws IOException
      Specified by:
      getPos in interface org.apache.hadoop.fs.Seekable
      Overrides:
      getPos in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • read

      public int read(long position, byte[] buffer, int offset, int length) throws IOException
      Specified by:
      read in interface org.apache.hadoop.fs.PositionedReadable
      Overrides:
      read in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • readFully

      public void readFully(long position, byte[] buffer, int offset, int length) throws IOException
      Specified by:
      readFully in interface org.apache.hadoop.fs.PositionedReadable
      Overrides:
      readFully in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • readFully

      public void readFully(long position, byte[] buffer) throws IOException
      Specified by:
      readFully in interface org.apache.hadoop.fs.PositionedReadable
      Overrides:
      readFully in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • seekToNewSource

      public boolean seekToNewSource(long targetPos) throws IOException
      Specified by:
      seekToNewSource in interface org.apache.hadoop.fs.Seekable
      Overrides:
      seekToNewSource in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • getWrappedStream

      @LimitedPrivate("HDFS") public InputStream getWrappedStream()
      Overrides:
      getWrappedStream in class org.apache.hadoop.fs.FSDataInputStream
    • read

      public int read(ByteBuffer buf) throws IOException
      Specified by:
      read in interface org.apache.hadoop.fs.ByteBufferReadable
      Overrides:
      read in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • getFileDescriptor

      public FileDescriptor getFileDescriptor() throws IOException
      Specified by:
      getFileDescriptor in interface org.apache.hadoop.fs.HasFileDescriptor
      Overrides:
      getFileDescriptor in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
    • setReadahead

      public void setReadahead(Long readahead) throws IOException, UnsupportedOperationException
      Specified by:
      setReadahead in interface org.apache.hadoop.fs.CanSetReadahead
      Overrides:
      setReadahead in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
      UnsupportedOperationException
    • setDropBehind

      public void setDropBehind(Boolean dropBehind) throws IOException, UnsupportedOperationException
      Specified by:
      setDropBehind in interface org.apache.hadoop.fs.CanSetDropBehind
      Overrides:
      setDropBehind in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
      UnsupportedOperationException
    • read

      public ByteBuffer read(org.apache.hadoop.io.ByteBufferPool bufferPool, int maxLength, EnumSet<org.apache.hadoop.fs.ReadOption> opts) throws IOException, UnsupportedOperationException
      Specified by:
      read in interface org.apache.hadoop.fs.HasEnhancedByteBufferAccess
      Overrides:
      read in class org.apache.hadoop.fs.FSDataInputStream
      Throws:
      IOException
      UnsupportedOperationException
    • releaseBuffer

      public void releaseBuffer(ByteBuffer buffer)
      Specified by:
      releaseBuffer in interface org.apache.hadoop.fs.HasEnhancedByteBufferAccess
      Overrides:
      releaseBuffer in class org.apache.hadoop.fs.FSDataInputStream
    • read

      public int read() throws IOException
      Overrides:
      read in class FilterInputStream
      Throws:
      IOException
    • skip

      public long skip(long n) throws IOException
      Overrides:
      skip in class FilterInputStream
      Throws:
      IOException
    • available

      public int available() throws IOException
      Overrides:
      available in class FilterInputStream
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class FilterInputStream
      Throws:
      IOException
    • mark

      public void mark(int readlimit)
      Overrides:
      mark in class FilterInputStream
    • reset

      public void reset() throws IOException
      Overrides:
      reset in class FilterInputStream
      Throws:
      IOException
    • markSupported

      public boolean markSupported()
      Overrides:
      markSupported in class FilterInputStream
    • unbuffer

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