Class BucketMetricsPipelineAggregator

Direct Known Subclasses:
AvgBucketPipelineAggregator, ExtendedStatsBucketPipelineAggregator, MaxBucketPipelineAggregator, MinBucketPipelineAggregator, PercentilesBucketPipelineAggregator, StatsBucketPipelineAggregator, SumBucketPipelineAggregator

public abstract class BucketMetricsPipelineAggregator extends SiblingPipelineAggregator
A class of sibling pipeline aggregations which calculate metrics across the buckets of a sibling aggregation
  • Field Details

  • Method Details

    • doReduce

      public final InternalAggregation doReduce(Aggregations aggregations, AggregationReduceContext context)
      Specified by:
      doReduce in class SiblingPipelineAggregator
    • preCollection

      protected void preCollection()
      Called before initial collection and between successive collection runs. A chance to initialize or re-initialize state
    • buildAggregation

      protected abstract InternalAggregation buildAggregation(Map<String,Object> metadata)
      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

      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 bucket
      Parameters:
      bucketKey - the key for this bucket as a String
      bucketValue - the value of the metric specified in bucketsPath for this bucket