Package org.apache.drill.exec.store.dfs
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.ByteBufferPositionedReadable,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.statistics.IOStatisticsSource,org.apache.hadoop.fs.StreamCapabilities
public class DrillFSDataInputStream
extends org.apache.hadoop.fs.FSDataInputStream
Wrapper around FSDataInputStream to collect IO Stats.
-
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 java.io.FilterInputStream
inFields inherited from interface org.apache.hadoop.fs.StreamCapabilities
ABORTABLE_STREAM, DROPBEHIND, HFLUSH, HSYNC, IOSTATISTICS, IOSTATISTICS_CONTEXT, PREADBYTEBUFFER, READAHEAD, READBYTEBUFFER, UNBUFFER, VECTOREDIO -
Constructor Summary
ConstructorsConstructorDescriptionDrillFSDataInputStream(org.apache.hadoop.fs.FSDataInputStream in, OperatorStats operatorStats) DrillFSDataInputStream(org.apache.hadoop.fs.FSDataInputStream in, OperatorStats operatorStats, OpenFileTracker openFileTracker) -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()longgetPos()voidmark(int readlimit) booleanintread()intread(long position, byte[] buffer, int offset, int length) intread(ByteBuffer buf) read(org.apache.hadoop.io.ByteBufferPool bufferPool, int maxLength, EnumSet<org.apache.hadoop.fs.ReadOption> opts) voidreadFully(long position, byte[] buffer) voidreadFully(long position, byte[] buffer, int offset, int length) voidreleaseBuffer(ByteBuffer buffer) voidreset()voidseek(long desired) booleanseekToNewSource(long targetPos) voidsetDropBehind(Boolean dropBehind) voidsetReadahead(Long readahead) longskip(long n) voidunbuffer()Methods inherited from class org.apache.hadoop.fs.FSDataInputStream
getIOStatistics, hasCapability, maxReadSizeForVectorReads, minSeekForVectorReads, read, read, readFully, readVectored, toStringMethods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytesMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
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
- Specified by:
seekin interfaceorg.apache.hadoop.fs.Seekable- Overrides:
seekin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
getPos
- Specified by:
getPosin interfaceorg.apache.hadoop.fs.Seekable- Overrides:
getPosin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.apache.hadoop.fs.PositionedReadable- Overrides:
readin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceorg.apache.hadoop.fs.PositionedReadable- Overrides:
readFullyin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceorg.apache.hadoop.fs.PositionedReadable- Overrides:
readFullyin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
seekToNewSource
- Specified by:
seekToNewSourcein interfaceorg.apache.hadoop.fs.Seekable- Overrides:
seekToNewSourcein classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
getWrappedStream
- Overrides:
getWrappedStreamin classorg.apache.hadoop.fs.FSDataInputStream
-
read
- Specified by:
readin interfaceorg.apache.hadoop.fs.ByteBufferReadable- Overrides:
readin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
getFileDescriptor
- Specified by:
getFileDescriptorin interfaceorg.apache.hadoop.fs.HasFileDescriptor- Overrides:
getFileDescriptorin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOException
-
setReadahead
- Specified by:
setReadaheadin interfaceorg.apache.hadoop.fs.CanSetReadahead- Overrides:
setReadaheadin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOExceptionUnsupportedOperationException
-
setDropBehind
- Specified by:
setDropBehindin interfaceorg.apache.hadoop.fs.CanSetDropBehind- Overrides:
setDropBehindin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOExceptionUnsupportedOperationException
-
read
public ByteBuffer read(org.apache.hadoop.io.ByteBufferPool bufferPool, int maxLength, EnumSet<org.apache.hadoop.fs.ReadOption> opts) throws IOException, UnsupportedOperationException - Specified by:
readin interfaceorg.apache.hadoop.fs.HasEnhancedByteBufferAccess- Overrides:
readin classorg.apache.hadoop.fs.FSDataInputStream- Throws:
IOExceptionUnsupportedOperationException
-
releaseBuffer
- Specified by:
releaseBufferin interfaceorg.apache.hadoop.fs.HasEnhancedByteBufferAccess- Overrides:
releaseBufferin classorg.apache.hadoop.fs.FSDataInputStream
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classFilterInputStream
-
reset
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classFilterInputStream
-
unbuffer
public void unbuffer()- Specified by:
unbufferin interfaceorg.apache.hadoop.fs.CanUnbuffer- Overrides:
unbufferin classorg.apache.hadoop.fs.FSDataInputStream
-