Class MonotonicBlockPackedWriter
java.lang.Object
org.apache.cassandra.index.sai.disk.v1.bitpack.AbstractBlockPackedWriter
org.apache.cassandra.index.sai.disk.v1.bitpack.MonotonicBlockPackedWriter
A writer for large monotonically increasing sequences of positive longs.
The writer is optimised for monotonic sequences and stores values as a series of deltas
from an expected value. The expected value is calculated from the minimum value in the block and the average
delta for the block. This means that stored values are generally smaller and can be packed
into a smaller number of bits, allowing for larger block sizes.
Modified copy of
MonotonicBlockPackedWriter to use DirectWriter for
optimised reads that doesn't require seeking through the whole file to open a thread-exclusive reader.-
Field Summary
Fields inherited from class org.apache.cassandra.index.sai.disk.v1.bitpack.AbstractBlockPackedWriter
blockIndex, blockMetaWriter, blockValues, finished, indexOutput -
Constructor Summary
ConstructorsConstructorDescriptionMonotonicBlockPackedWriter(org.apache.lucene.store.IndexOutput out, int blockSize) -
Method Summary
Methods inherited from class org.apache.cassandra.index.sai.disk.v1.bitpack.AbstractBlockPackedWriter
finish
-
Constructor Details
-
MonotonicBlockPackedWriter
public MonotonicBlockPackedWriter(org.apache.lucene.store.IndexOutput out, int blockSize)
-
-
Method Details
-
add
Description copied from class:AbstractBlockPackedWriterAppend a new long.- Overrides:
addin classAbstractBlockPackedWriter- Throws:
IOException
-
flushBlock
- Specified by:
flushBlockin classAbstractBlockPackedWriter- Throws:
IOException
-