Class MaxBucketPipelineAggregator
java.lang.Object
org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator
org.elasticsearch.search.aggregations.pipeline.BucketMetricsPipelineAggregator
org.elasticsearch.search.aggregations.pipeline.MaxBucketPipelineAggregator
- All Implemented Interfaces:
NamedWriteable,Writeable
public class MaxBucketPipelineAggregator extends BucketMetricsPipelineAggregator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
PipelineAggregator.Parser, PipelineAggregator.PipelineTreeNested 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.BucketMetricsPipelineAggregator
format, gapPolicy -
Constructor Summary
Constructors Constructor Description MaxBucketPipelineAggregator(StreamInput in)Read from a stream. -
Method Summary
Modifier and Type Method Description protected InternalAggregationbuildAggregation(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 voidcollectBucketValue(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.StringgetWriteableName()The name of the writeable object.protected voidpreCollection()Called before initial collection and between successive collection runs.Methods inherited from class org.elasticsearch.search.aggregations.pipeline.BucketMetricsPipelineAggregator
doReduce, doWriteTo, innerWriteToMethods inherited from class org.elasticsearch.search.aggregations.pipeline.SiblingPipelineAggregator
reduceMethods inherited from class org.elasticsearch.search.aggregations.pipeline.PipelineAggregator
bucketsPaths, metadata, name, writeToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MaxBucketPipelineAggregator
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
getWriteableName
public java.lang.String getWriteableName()Description copied from class:PipelineAggregatorThe name of the writeable object.- Specified by:
getWriteableNamein interfaceNamedWriteable- Overrides:
getWriteableNamein classPipelineAggregator
-
preCollection
protected void preCollection()Description copied from class:BucketMetricsPipelineAggregatorCalled before initial collection and between successive collection runs. A chance to initialize or re-initialize state- Overrides:
preCollectionin classBucketMetricsPipelineAggregator
-
collectBucketValue
protected void collectBucketValue(java.lang.String bucketKey, java.lang.Double bucketValue)Description copied from class:BucketMetricsPipelineAggregatorCalled for each bucket with a value so the state can be modified based on the key and metric value for this bucket- Specified by:
collectBucketValuein classBucketMetricsPipelineAggregator- Parameters:
bucketKey- the key for this bucket as a StringbucketValue- the value of the metric specified inbucketsPathfor this bucket
-
buildAggregation
protected InternalAggregation buildAggregation(java.util.Map<java.lang.String,java.lang.Object> metadata)Description copied from class:BucketMetricsPipelineAggregatorCalled after a collection run is finished to build the aggregation for the collected state.- Specified by:
buildAggregationin classBucketMetricsPipelineAggregator- Parameters:
metadata- the metadata to add to the resulting aggregation
-