public class CompressedInputStream extends RebufferingInputStream implements java.lang.AutoCloseable
RebufferingInputStream except in some unit tests.
Compressed chunks transferred will be a subset of all chunks in the source streamed sstable - just enough to
deserialize the requested partition position ranges. Correctness of the entire operation depends on provided
partition position ranges and compressed chunks properly matching, and there is no way on the receiving side to
verify if that's the case, which arguably makes this a little brittle.DataInputPlus.DataInputStreamPlusbuffer| Constructor and Description |
|---|
CompressedInputStream(DataInputPlus input,
CompressionInfo compressionInfo,
ChecksumType checksumType,
java.util.function.DoubleSupplier validateChecksumChance) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
position(long position)
Invoked when crossing into the next
SSTableReader.PartitionPositionBounds section
in CassandraCompressedStreamReader.read(DataInputPlus). |
protected void |
reBuffer()
Implementations must implement this method to refill the buffer.
|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readFully, readInt, readLine, readLong, readPrimitiveSlowly, readShort, readUnsignedByte, readUnsignedShort, readUnsignedVInt, readUTF, readVInt, skipBytesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitskipBytesFullypublic CompressedInputStream(DataInputPlus input, CompressionInfo compressionInfo, ChecksumType checksumType, java.util.function.DoubleSupplier validateChecksumChance)
input - Input input to read compressed data fromcompressionInfo - Compression infopublic void position(long position)
throws java.io.IOException
SSTableReader.PartitionPositionBounds section
in CassandraCompressedStreamReader.read(DataInputPlus).
Will skip 1..n compressed chunks of the original sstable.java.io.IOExceptionprotected void reBuffer()
throws java.io.IOException
RebufferingInputStreamreBuffer in class RebufferingInputStreamjava.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamCopyright © 2009-2020 The Apache Software Foundation