Class BucketMetricsPipelineAggregator

java.lang.Object
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 java.io.IOException
      Description copied from class: PipelineAggregator
      Write the body of the aggregation to the wire.
      Overrides:
      doWriteTo in class PipelineAggregator
      Throws:
      java.io.IOException
    • innerWriteTo

      protected void innerWriteTo​(StreamOutput out) throws java.io.IOException
      Throws:
      java.io.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​(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.
      Parameters:
      metadata - the metadata to add to the resulting aggregation
    • collectBucketValue

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