Class BucketMetricsPipelineAggregator
java.lang.Object
org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator
org.elasticsearch.search.aggregations.pipeline.BucketMetricsPipelineAggregator
- All Implemented Interfaces:
NamedWriteable
,Writeable
- Direct Known Subclasses:
AvgBucketPipelineAggregator
,ExtendedStatsBucketPipelineAggregator
,MaxBucketPipelineAggregator
,MinBucketPipelineAggregator
,PercentilesBucketPipelineAggregator
,StatsBucketPipelineAggregator
,SumBucketPipelineAggregator
A class of sibling pipeline aggregations which calculate metrics across the
buckets of a sibling aggregation
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
PipelineAggregator.Parser, PipelineAggregator.PipelineTree
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected final DocValueFormat
protected final BucketHelpers.GapPolicy
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InternalAggregation
buildAggregation
(Map<String, Object> metadata) Called after a collection run is finished to build the aggregation for the collected state.protected abstract void
collectBucketValue
(String bucketKey, Double bucketValue) Called for each bucket with a value so the state can be modified based on the key and metric value for this bucketfinal InternalAggregation
doReduce
(Aggregations aggregations, InternalAggregation.ReduceContext context) final void
doWriteTo
(StreamOutput out) Write the body of the aggregation to the wire.protected void
innerWriteTo
(StreamOutput out) protected void
Called before initial collection and between successive collection runs.Methods inherited from class org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator
reduce
Methods inherited from class org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
bucketsPaths, getWriteableName, metadata, name, writeTo
-
Field Details
-
format
-
gapPolicy
-
-
Method Details
-
doWriteTo
Description copied from class:PipelineAggregator
Write the body of the aggregation to the wire.- Overrides:
doWriteTo
in classPipelineAggregator
- Throws:
IOException
-
innerWriteTo
- Throws:
IOException
-
doReduce
public final InternalAggregation doReduce(Aggregations aggregations, InternalAggregation.ReduceContext context) - Specified by:
doReduce
in classSiblingPipelineAggregator
-
preCollection
protected void preCollection()Called before initial collection and between successive collection runs. A chance to initialize or re-initialize state -
buildAggregation
Called after a collection run is finished to build the aggregation for the collected state.- Parameters:
metadata
- the metadata to add to the resulting aggregation
-
collectBucketValue
Called for each bucket with a value so the state can be modified based on the key and metric value for this bucket- Parameters:
bucketKey
- the key for this bucket as a StringbucketValue
- the value of the metric specified inbucketsPath
for this bucket
-