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.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.
-
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
in
Fields inherited from interface org.apache.hadoop.fs.StreamCapabilities
DROPBEHIND, HFLUSH, HSYNC, READAHEAD, UNBUFFER
-
Constructor Summary
ConstructorDescriptionDrillFSDataInputStream
(org.apache.hadoop.fs.FSDataInputStream in, OperatorStats operatorStats) DrillFSDataInputStream
(org.apache.hadoop.fs.FSDataInputStream in, OperatorStats operatorStats, OpenFileTracker openFileTracker) -
Method Summary
Modifier and TypeMethodDescriptionint
void
close()
long
getPos()
void
mark
(int readlimit) boolean
int
read()
int
read
(long position, byte[] buffer, int offset, int length) int
read
(ByteBuffer buf) read
(org.apache.hadoop.io.ByteBufferPool bufferPool, int maxLength, EnumSet<org.apache.hadoop.fs.ReadOption> opts) void
readFully
(long position, byte[] buffer) void
readFully
(long position, byte[] buffer, int offset, int length) void
releaseBuffer
(ByteBuffer buffer) void
reset()
void
seek
(long desired) boolean
seekToNewSource
(long targetPos) void
setDropBehind
(Boolean dropBehind) void
setReadahead
(Long readahead) long
skip
(long n) void
unbuffer()
Methods inherited from class org.apache.hadoop.fs.FSDataInputStream
hasCapability, read, toString
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
-
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:
seek
in interfaceorg.apache.hadoop.fs.Seekable
- Overrides:
seek
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
getPos
- Specified by:
getPos
in interfaceorg.apache.hadoop.fs.Seekable
- Overrides:
getPos
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
read
- Specified by:
read
in interfaceorg.apache.hadoop.fs.PositionedReadable
- Overrides:
read
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceorg.apache.hadoop.fs.PositionedReadable
- Overrides:
readFully
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceorg.apache.hadoop.fs.PositionedReadable
- Overrides:
readFully
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
seekToNewSource
- Specified by:
seekToNewSource
in interfaceorg.apache.hadoop.fs.Seekable
- Overrides:
seekToNewSource
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
getWrappedStream
- Overrides:
getWrappedStream
in classorg.apache.hadoop.fs.FSDataInputStream
-
read
- Specified by:
read
in interfaceorg.apache.hadoop.fs.ByteBufferReadable
- Overrides:
read
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
getFileDescriptor
- Specified by:
getFileDescriptor
in interfaceorg.apache.hadoop.fs.HasFileDescriptor
- Overrides:
getFileDescriptor
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
-
setReadahead
- Specified by:
setReadahead
in interfaceorg.apache.hadoop.fs.CanSetReadahead
- Overrides:
setReadahead
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
UnsupportedOperationException
-
setDropBehind
- Specified by:
setDropBehind
in interfaceorg.apache.hadoop.fs.CanSetDropBehind
- Overrides:
setDropBehind
in classorg.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 interfaceorg.apache.hadoop.fs.HasEnhancedByteBufferAccess
- Overrides:
read
in classorg.apache.hadoop.fs.FSDataInputStream
- Throws:
IOException
UnsupportedOperationException
-
releaseBuffer
- Specified by:
releaseBuffer
in interfaceorg.apache.hadoop.fs.HasEnhancedByteBufferAccess
- Overrides:
releaseBuffer
in classorg.apache.hadoop.fs.FSDataInputStream
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
mark
in classFilterInputStream
-
reset
- Overrides:
reset
in classFilterInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classFilterInputStream
-
unbuffer
public void unbuffer()- Specified by:
unbuffer
in interfaceorg.apache.hadoop.fs.CanUnbuffer
- Overrides:
unbuffer
in classorg.apache.hadoop.fs.FSDataInputStream
-