Class BucketMetricsPipelineAggregator

All Implemented Interfaces:
NamedWriteable, Writeable
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

    • doWriteTo

      public final void doWriteTo(StreamOutput out) throws IOException
      Description copied from class: PipelineAggregator
      Write the body of the aggregation to the wire.
      doWriteTo in class PipelineAggregator
    • innerWriteTo

      protected void innerWriteTo(StreamOutput out) throws IOException
    • doReduce

      public final InternalAggregation doReduce(Aggregations aggregations, InternalAggregation.ReduceContext 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.
      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
      bucketKey - the key for this bucket as a String
      bucketValue - the value of the metric specified in bucketsPath for this bucket