public class ThrottleableDecompressorStream
extends org.apache.hadoop.io.compress.DecompressorStream
DecompressorStream that allows a dynamic reduction in block size
of the file read from disk. The purpose is to make determining the position
in the underlying compressed data stream more accurate.| Constructor and Description |
|---|
ThrottleableDecompressorStream(InputStream in,
org.apache.hadoop.io.compress.Decompressor decompressor) |
ThrottleableDecompressorStream(InputStream in,
org.apache.hadoop.io.compress.Decompressor decompressor,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRead()
How many bytes have been read from disk so far?
|
protected int |
getCompressedData()
Reads the compressed input into the buffer.
|
int |
setReadStep(int newReadStep)
The compressed data is read from disk in blocks the size of the allocated
buffer.
|
available, checkStream, close, decompress, mark, markSupported, read, read, reset, resetState, skipgetPos, seek, seekToNewSourcereadpublic ThrottleableDecompressorStream(InputStream in, org.apache.hadoop.io.compress.Decompressor decompressor, int bufferSize) throws IOException
IOExceptionpublic ThrottleableDecompressorStream(InputStream in, org.apache.hadoop.io.compress.Decompressor decompressor) throws IOException
IOExceptionpublic final int setReadStep(int newReadStep)
newReadStep - If the new value is outside the valid range of the allocated
buffer it is set to the size of the buffer: setReadStep(0)protected int getCompressedData()
throws IOException
getCompressedData in class org.apache.hadoop.io.compress.DecompressorStreamIOExceptionpublic long getBytesRead()
Copyright © 2019. All Rights Reserved.