Package io.activej.aggregation
Class AggregationState
java.lang.Object
io.activej.aggregation.AggregationState
- All Implemented Interfaces:
OTState<AggregationDiff>
Represents aggregation metadata. Chunks are stored in an index (represented by an array of
RangeTree) for efficient search.
Provides methods for managing index, querying for chunks by key, searching for chunks that are available for consolidation.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToIndex(AggregationChunk chunk) voidapply(AggregationDiff commit) static booleanchunkMightContainQueryValues(PrimaryKey minQueryKey, PrimaryKey maxQueryKey, PrimaryKey minChunkKey, PrimaryKey maxChunkKey) findChunks(AggregationPredicate predicate, List<String> fields) findChunksForConsolidationHotSegment(int maxChunks) findChunksForConsolidationHotSegment(int maxChunks, Set<Object> lockedChunkIds) findChunksForConsolidationMinKey(int maxChunks, int optimalChunkSize) findChunksForConsolidationMinKey(int maxChunks, int optimalChunkSize, Set<Object> lockedChunkIds) voidinit()voidremoveFromIndex(AggregationChunk chunk) toString()
-
Method Details
-
getChunks
-
apply
- Specified by:
applyin interfaceOTState<AggregationDiff>
-
addToIndex
-
removeFromIndex
-
init
public void init()- Specified by:
initin interfaceOTState<AggregationDiff>
-
findOverlappingChunks
-
findChunksGroupWithMostOverlaps
-
findChunksForConsolidationMinKey
-
findChunksForConsolidationMinKey
public List<AggregationChunk> findChunksForConsolidationMinKey(int maxChunks, int optimalChunkSize, Set<Object> lockedChunkIds) -
findChunksForConsolidationHotSegment
-
findChunksForConsolidationHotSegment
public List<AggregationChunk> findChunksForConsolidationHotSegment(int maxChunks, Set<Object> lockedChunkIds) -
getConsolidationDebugInfo
-
chunkMightContainQueryValues
@VisibleForTesting public static boolean chunkMightContainQueryValues(PrimaryKey minQueryKey, PrimaryKey maxQueryKey, PrimaryKey minChunkKey, PrimaryKey maxChunkKey) -
findChunks
-
toString
-