Class InternalTDigestPercentileRanks

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

public class InternalTDigestPercentileRanks
extends InternalNumericMetricsAggregation.MultiValue
implements PercentileRanks
  • Field Details

  • Constructor Details

    • InternalTDigestPercentileRanks

      public InternalTDigestPercentileRanks​(java.lang.String name, double[] cdfValues, TDigestState state, boolean keyed, DocValueFormat formatter, java.util.Map<java.lang.String,​java.lang.Object> metadata)
    • InternalTDigestPercentileRanks

      public InternalTDigestPercentileRanks​(StreamInput in) throws
      Read from a stream.
  • Method Details

    • getWriteableName

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

      public java.util.Iterator<Percentile> iterator()
      Specified by:
      iterator in interface java.lang.Iterable<Percentile>
    • percent

      public double percent​(double value)
      Description copied from interface: PercentileRanks
      Return the percentile for the given value.
      Specified by:
      percent in interface PercentileRanks
    • percentAsString

      public java.lang.String percentAsString​(double value)
      Description copied from interface: PercentileRanks
      Return the percentile for the given value as a String.
      Specified by:
      percentAsString in interface PercentileRanks
    • value

      public double value​(double key)
    • createReduced

      protected createReduced​(java.lang.String name, double[] keys, TDigestState merged, boolean keyed, java.util.Map<java.lang.String,​java.lang.Object> metadata)
    • percentileRank

      public static double percentileRank​(TDigestState state, double value)
    • doWriteTo

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

      public double value​(java.lang.String 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
      name - of the value
      the value
    • valueNames

      public java.lang.Iterable<java.lang.String> 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..
      iterable over all value names
    • formatter

      public DocValueFormat formatter()
    • getEstimatedMemoryFootprint

      public long getEstimatedMemoryFootprint()
    • getState

      public TDigestState getState()
      Return the internal TDigestState sketch for this metric.
    • getKeys

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

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

      public reduce​(java.util.List<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:
    • 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
    • equals

      public boolean equals​(java.lang.Object obj)
      equals in class InternalNumericMetricsAggregation
    • hashCode

      public int hashCode()
      hashCode in class InternalNumericMetricsAggregation