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.DataInputStreamPlus
buffer
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, skipBytes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
skipBytesFully
public 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.IOException
protected void reBuffer() throws java.io.IOException
RebufferingInputStream
reBuffer
in class RebufferingInputStream
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
Copyright © 2009-2022 The Apache Software Foundation