Class BlockZipperSplitter
java.lang.Object
com.illumon.iris.db.v2.sources.chunk.kernels.BlockZipperSplitter
public class BlockZipperSplitter extends Object
Special purpose kernel used when a rehashing operation occurs in the middle of a BlockZipper/block number session:
Effectively in such a case the number of blocks and the mask used for those blocks changes, but BlockZipper cannot
resume a block data collection for a given block number after the block count has changed. Instead we'll continue
using block zipper for the same block number (based on the pre-rehash numbering) and subsequently split the result
according to the new block mapping
-
Constructor Summary
Constructors Constructor Description BlockZipperSplitter(BlockZipper blockZipper)
Builds a BlockZipperSplitter associated to a given BlockZipper -
Method Summary
Modifier and Type Method Description com.illumon.iris.db.v2.sources.chunk.kernels.BlockZipperSplitter.Context
getContext(int logChunkCount, int chunkSize, int logBlockCount)
Creates a context for the current set of operationsIntChunk[]
splitByPositions(com.illumon.iris.db.v2.sources.chunk.kernels.BlockZipperSplitter.Context context, int blockNumberShift, IntChunk inputPosition, IntChunk... hashChunks)
Split the inputPosition according the the values they are pointing to
-
Constructor Details
-
BlockZipperSplitter
Builds a BlockZipperSplitter associated to a given BlockZipper- Parameters:
blockZipper
-
-
-
Method Details
-
splitByPositions
public IntChunk[] splitByPositions(com.illumon.iris.db.v2.sources.chunk.kernels.BlockZipperSplitter.Context context, int blockNumberShift, IntChunk inputPosition, IntChunk... hashChunks)Split the inputPosition according the the values they are pointing to- Parameters:
context
-blockNumberShift
- - The number of bits the hash value is shifted to produce the hash blockinputPosition
- - The positions to be splithashChunks
- - The chunks storing the hash values- Returns:
- Positions split by block number
-
getContext
public com.illumon.iris.db.v2.sources.chunk.kernels.BlockZipperSplitter.Context getContext(int logChunkCount, int chunkSize, int logBlockCount)Creates a context for the current set of operations- Parameters:
logChunkCount
- - The base 2 logarithm of the order of the split (i.e. the number of hash table resize operations happened while we were inserting data to the same blockchunkSize
- - The size of the result chunkslogBlockCount
- - The logarithm of the current block count
-