Module org.elasticsearch.compute
Package org.elasticsearch.compute.lucene
Class TimeSeriesSourceOperator
java.lang.Object
org.elasticsearch.compute.operator.SourceOperator
org.elasticsearch.compute.lucene.LuceneOperator
org.elasticsearch.compute.lucene.LuceneSourceOperator
org.elasticsearch.compute.lucene.TimeSeriesSourceOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
Extension of
LuceneSourceOperator for time-series aggregation that inserts metadata blocks,
such as slice index and future max timestamp, to allow downstream operators to optimize processing.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.lucene.LuceneOperator
LuceneOperator.StatusNested classes/interfaces inherited from class org.elasticsearch.compute.operator.SourceOperator
SourceOperator.SourceOperatorFactoryNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
Fields inherited from class org.elasticsearch.compute.lucene.LuceneOperator
blockFactory, currentSlice, NO_LIMIT, shardContextCountersFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionTimeSeriesSourceOperator(List<? extends org.elasticsearch.core.RefCounted> shardContextCounters, BlockFactory blockFactory, int maxPageSize, LuceneSliceQueue sliceQueue, int limit, Limiter limiter) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildMetadataBlocks(Block[] blocks, int offset, int currentPagePos) protected intstatic intpageSize(long estimateRowSizeInBytes, long maxPageSizeInBytes) For time-series queries, try to use a page size that is a multiple of CHUNK_SIZE (see NUMERIC_BLOCK_SIZE in the tsdb codec) to enable bulk loading of numeric or tsid fields.Methods inherited from class org.elasticsearch.compute.lucene.LuceneSourceOperator
additionalClose, describe, finish, getCheckedOutput, isFinishedMethods inherited from class org.elasticsearch.compute.lucene.LuceneOperator
close, getOutput, status, toStringMethods inherited from class org.elasticsearch.compute.operator.SourceOperator
addInput, needsInput
-
Constructor Details
-
TimeSeriesSourceOperator
public TimeSeriesSourceOperator(List<? extends org.elasticsearch.core.RefCounted> shardContextCounters, BlockFactory blockFactory, int maxPageSize, LuceneSliceQueue sliceQueue, int limit, Limiter limiter)
-
-
Method Details
-
numMetadataBlocks
protected int numMetadataBlocks()- Overrides:
numMetadataBlocksin classLuceneSourceOperator
-
buildMetadataBlocks
- Overrides:
buildMetadataBlocksin classLuceneSourceOperator
-
pageSize
public static int pageSize(long estimateRowSizeInBytes, long maxPageSizeInBytes) For time-series queries, try to use a page size that is a multiple of CHUNK_SIZE (see NUMERIC_BLOCK_SIZE in the tsdb codec) to enable bulk loading of numeric or tsid fields. Avoid pages that are too large, as this can disable bulk loading if there are holes in the doc IDs and disable constant block optimizations. Therefore, we cap the page size at 2048, which balances the overhead per page with the benefits of bulk loading and constant blocks.
-