Class DownsamplingSpecification


  • public class DownsamplingSpecification
    extends java.lang.Object
    Specifies how to reduce the amount of returned MetricValues from an OpenTSDB query. To support this, OpenTSDB queries support the notion of down-sampling, specifying a smallest time period between returned MetricValues and a function (such as average or sum) to apply to the time-series value in each time period to represent the (single) reported value for the period. For example, data can be down-sampled such that only the average over a 10 minute period is reported.

    Refer to the OpenTSDB documentation for details.

    • Constructor Summary

      Constructors 
      Constructor Description
      DownsamplingSpecification​(com.elastisys.scale.commons.json.types.TimeInterval interval, com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunction function)
      Specifies a down-sampling using the specified parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunction getFunction()
      The function used to aggregate data points within each sampling interval to a single value.
      com.elastisys.scale.commons.json.types.TimeInterval getInterval()
      The sampling interval.
      int hashCode()  
      java.lang.String toString()  
      void validate()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DownsamplingSpecification

        public DownsamplingSpecification​(com.elastisys.scale.commons.json.types.TimeInterval interval,
                                         com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunction function)
        Specifies a down-sampling using the specified parameters.
        Parameters:
        interval - The sampling interval.
        function - The function used to aggregate data points within each sampling interval to a single value.
    • Method Detail

      • getInterval

        public com.elastisys.scale.commons.json.types.TimeInterval getInterval()
        The sampling interval.
        Returns:
      • getFunction

        public com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunction getFunction()
        The function used to aggregate data points within each sampling interval to a single value.
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • validate

        public void validate()
                      throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException