Class MultiCountStat<T>

java.lang.Object
org.apache.storm.metric.internal.MultiCountStat<T>

public class MultiCountStat<T> extends Object
Acts as a MultiCount Stat, but keeps track of approximate counts for the last 10 mins, 3 hours, 1 day, and all time. for the same keys
  • Field Details

  • Constructor Details

    • MultiCountStat

      public MultiCountStat(int numBuckets)
      Constructor.
      Parameters:
      numBuckets - the number of buckets to divide the time periods into.
  • Method Details

    • incBy

      public void incBy(T key, long count)
      Increase the count by the given value.
      Parameters:
      count - number to count
    • keyToString

      protected String keyToString(T key)
    • getTimeCounts

      public Map<String,Map<T,Long>> getTimeCounts()
    • close

      public void close()