Class StatsBucketPipelineAggregator
- java.lang.Object
-
- org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
-
- org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator
-
- org.elasticsearch.search.aggregations.pipeline.bucketmetrics.BucketMetricsPipelineAggregator
-
- org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.StatsBucketPipelineAggregator
-
- All Implemented Interfaces:
NamedWriteable
,Writeable
public class StatsBucketPipelineAggregator extends BucketMetricsPipelineAggregator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
PipelineAggregator.Parser
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.aggregations.pipeline.bucketmetrics.BucketMetricsPipelineAggregator
format, gapPolicy
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StatsBucketPipelineAggregator(java.lang.String name, java.lang.String[] bucketsPaths, BucketHelpers.GapPolicy gapPolicy, DocValueFormat formatter, java.util.Map<java.lang.String,java.lang.Object> metaData)
StatsBucketPipelineAggregator(StreamInput in)
-
Method Summary
Modifier and Type Method Description protected InternalAggregation
buildAggregation(java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metadata)
Called after a collection run is finished to build the aggregation for the collected state.protected void
collectBucketValue(java.lang.String bucketKey, java.lang.Double bucketValue)
Called for each bucket with a value so the state can be modified based on the key and metric value for this bucketjava.lang.String
getWriteableName()
Returns the name of the writeable objectprotected void
preCollection()
Called before initial collection and between successive collection runs.-
Methods inherited from class org.elasticsearch.search.aggregations.pipeline.bucketmetrics.BucketMetricsPipelineAggregator
doReduce, doWriteTo, innerWriteTo
-
Methods inherited from class org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator
reduce
-
Methods inherited from class org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
bucketsPaths, metaData, name, writeTo
-
-
-
-
Constructor Detail
-
StatsBucketPipelineAggregator
protected StatsBucketPipelineAggregator(java.lang.String name, java.lang.String[] bucketsPaths, BucketHelpers.GapPolicy gapPolicy, DocValueFormat formatter, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
StatsBucketPipelineAggregator
public StatsBucketPipelineAggregator(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getWriteableName
public java.lang.String getWriteableName()
Description copied from interface:NamedWriteable
Returns the name of the writeable object
-
preCollection
protected void preCollection()
Description copied from class:BucketMetricsPipelineAggregator
Called before initial collection and between successive collection runs. A chance to initialize or re-initialize state- Overrides:
preCollection
in classBucketMetricsPipelineAggregator
-
collectBucketValue
protected void collectBucketValue(java.lang.String bucketKey, java.lang.Double bucketValue)
Description copied from class:BucketMetricsPipelineAggregator
Called for each bucket with a value so the state can be modified based on the key and metric value for this bucket- Specified by:
collectBucketValue
in classBucketMetricsPipelineAggregator
- Parameters:
bucketKey
- the key for this bucket as a StringbucketValue
- the value of the metric specified inbucketsPath
for this bucket
-
buildAggregation
protected InternalAggregation buildAggregation(java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metadata)
Description copied from class:BucketMetricsPipelineAggregator
Called after a collection run is finished to build the aggregation for the collected state.- Specified by:
buildAggregation
in classBucketMetricsPipelineAggregator
- Parameters:
pipelineAggregators
- the pipeline aggregators to add to the resulting aggregationmetadata
- the metadata to add to the resulting aggregation
-
-