Module org.elasticsearch.compute
Class TimeSeriesAggregationOperator
java.lang.Object
org.elasticsearch.compute.operator.HashAggregationOperator
org.elasticsearch.compute.operator.TimeSeriesAggregationOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
A specialized version of
HashAggregationOperator that aggregates time-series aggregations from time-series sources.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.operator.HashAggregationOperator
HashAggregationOperator.Builder, HashAggregationOperator.StatusNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
Fields inherited from class org.elasticsearch.compute.operator.HashAggregationOperator
aggregatorFactories, aggregatorMode, aggregators, blockHash, blockHashSupplier, DEFAULT_PARTIAL_EMIT_KEYS_THRESHOLD, DEFAULT_PARTIAL_EMIT_UNIQUENESS_THRESHOLD, driverContext, emitCount, emitNanos, output, partialEmitKeysThreshold, partialEmitUniquenessThreshold, rowsAddedInCurrentBatchFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionTimeSeriesAggregationOperator(Rounding.Prepared timeBucket, DateFieldMapper.Resolution timeResolution, AggregatorMode aggregatorMode, List<GroupingAggregator.Factory> aggregators, Supplier<BlockHash> blockHash, Rounding.Prepared outputTimeBucket, DriverContext driverContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()notifies the operator that it won't be used anymore (i.e.protected IntVectorcustomizeSelected(GroupingAggregator aggregator, IntVector selected) Customize theselectedgroupIds that are sent to the agg'sGroupingAggregatorFunction.prepareEvaluateIntermediate(org.elasticsearch.compute.data.IntVector, org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext)andGroupingAggregatorFunction.prepareEvaluateFinal(org.elasticsearch.compute.data.IntVector, org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext).protected voidemit()protected GroupingAggregatorEvaluationContextevaluationContext(BlockHash blockHash) voidfinish()notifies the operator that it won't receive any more input pagesprotected booleanMethods inherited from class org.elasticsearch.compute.operator.HashAggregationOperator
addInput, canProduceMoreDataWithoutExtraInput, checkState, getOutput, isFinished, needsInput, status, toString
-
Constructor Details
-
TimeSeriesAggregationOperator
public TimeSeriesAggregationOperator(Rounding.Prepared timeBucket, DateFieldMapper.Resolution timeResolution, AggregatorMode aggregatorMode, List<GroupingAggregator.Factory> aggregators, Supplier<BlockHash> blockHash, Rounding.Prepared outputTimeBucket, DriverContext driverContext)
-
-
Method Details
-
finish
public void finish()Description copied from interface:Operatornotifies the operator that it won't receive any more input pages- Specified by:
finishin interfaceOperator- Overrides:
finishin classHashAggregationOperator
-
emit
protected void emit()- Overrides:
emitin classHashAggregationOperator
-
shouldEmitPartialResultsPeriodically
protected boolean shouldEmitPartialResultsPeriodically()- Overrides:
shouldEmitPartialResultsPeriodicallyin classHashAggregationOperator
-
customizeSelected
Description copied from class:HashAggregationOperatorCustomize theselectedgroupIds that are sent to the agg'sGroupingAggregatorFunction.prepareEvaluateIntermediate(org.elasticsearch.compute.data.IntVector, org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext)andGroupingAggregatorFunction.prepareEvaluateFinal(org.elasticsearch.compute.data.IntVector, org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext). TSDB uses this to do less work later on.- Overrides:
customizeSelectedin classHashAggregationOperator
-
evaluationContext
- Overrides:
evaluationContextin classHashAggregationOperator
-
close
public void close()Description copied from interface:Operatornotifies the operator that it won't be used anymore (i.e. none of the other methods called), and its resources can be cleaned up- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOperator- Specified by:
closein interfaceorg.elasticsearch.core.Releasable- Overrides:
closein classHashAggregationOperator
-