Class InternalHDRPercentiles

All Implemented Interfaces:
<Percentile>, NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment, Aggregation, NumericMetricsAggregation, NumericMetricsAggregation.MultiValue, Percentiles

public class InternalHDRPercentiles extends InternalNumericMetricsAggregation.MultiValue implements Percentiles
  • Field Details

    • NAME

      public static final  NAME
      See Also:
      Constant Field Values
    • keys

      protected final double[] keys
    • state

      protected final org.HdrHistogram.DoubleHistogram state
    • keyed

      protected final boolean keyed
  • Constructor Details

    • InternalHDRPercentiles

      public InternalHDRPercentiles( name, double[] percents, org.HdrHistogram.DoubleHistogram state, boolean keyed, DocValueFormat formatter, <,​> metadata)
    • InternalHDRPercentiles

      public InternalHDRPercentiles(StreamInput in) throws
      Read from a stream.
      Throws:
  • Method Details

    • getWriteableName

      public  getWriteableName()
      Description copied from interface: NamedWriteable
      Returns the name of the writeable object
      Specified by:
      getWriteableName in interface NamedWriteable
    • iterator

      public <Percentile> iterator()
      Specified by:
       in interface <Percentile>
    • percentile

      public double percentile(double percent)
      Description copied from interface: Percentiles
      Return the value associated with the provided percentile.
      Specified by:
      percentile in interface Percentiles
    • percentileAsString

      public  percentileAsString(double percent)
      Description copied from interface: Percentiles
      Return the value associated with the provided percentile as a String.
      Specified by:
      percentileAsString in interface Percentiles
    • value

      public double value(double key)
    • createReduced

      protected org.elasticsearch.search.aggregations.metrics.AbstractInternalHDRPercentiles createReduced( name, double[] keys, org.HdrHistogram.DoubleHistogram merged, boolean keyed, <,​> metadata)
    • doWriteTo

      protected void doWriteTo(StreamOutput out) throws
      Specified by:
      doWriteTo in class InternalAggregation
      Throws:
    • value

      public double value( name)
      Description copied from interface: NumericMetricsAggregation.MultiValue
      Return the result of 1 value by name
      Specified by:
      value in interface NumericMetricsAggregation.MultiValue
      Specified by:
      value in class InternalNumericMetricsAggregation.MultiValue
      Parameters:
      name - of the value
      Returns:
      the value
    • valueNames

      public <> valueNames()
      Description copied from interface: NumericMetricsAggregation.MultiValue
      Return an iterable over all value names this multi value aggregation provides. The iterable might be created on the fly, if you need to call this multiple times, please cache the result in a variable on caller side..
      Returns:
      iterable over all value names
    • formatter

      public DocValueFormat formatter()
    • getEstimatedMemoryFootprint

      public long getEstimatedMemoryFootprint()
    • getState

      public org.HdrHistogram.DoubleHistogram getState()
      Return the internal DoubleHistogram sketch for this metric.
    • getKeys

      public double[] getKeys()
      Return the keys (percentiles) requested.
    • keyed

      public boolean keyed()
      Should the output be keyed.
    • reduce

      public org.elasticsearch.search.aggregations.metrics.AbstractInternalHDRPercentiles reduce(<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
      Description copied from class: InternalAggregation
      Reduces the given aggregations to a single one and returns it. In most cases, the assumption will be the all given aggregations are of the same type (the same type as this aggregation). For best efficiency, when implementing, try reusing an existing instance (typically the first in the given list) to save on redundant object construction.
      Specified by:
      reduce in class InternalAggregation
      See Also:
      InternalAggregation.mustReduceOnSingleInternalAgg()
    • doXContentBody

      public org.elasticsearch.common.xcontent.XContentBuilder doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      doXContentBody in class InternalAggregation
      Throws:
    • equals

      public boolean equals( obj)
      Overrides:
      equals in class InternalNumericMetricsAggregation
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class InternalNumericMetricsAggregation