Package com.alibaba.jstorm.stats.rolling

Examples of com.alibaba.jstorm.stats.rolling.RollingWindowSet


  protected boolean enable = true;

  protected Integer rate;

  public CommonStatsRolling(Integer rate) {
    RollingWindowSet emitted = StatFunction
        .keyed_counter_rolling_window_set(
            StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
    staticTypeMap.put(StaticsType.emitted, emitted);

    RollingWindowSet sendTps = StatFunction.keyed_avg_rolling_window_set(
        StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
    staticTypeMap.put(StaticsType.send_tps, sendTps);

    RollingWindowSet recvTps = StatFunction.keyed_avg_rolling_window_set(
        StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
    staticTypeMap.put(StaticsType.recv_tps, recvTps);

    RollingWindowSet acked = StatFunction.keyed_counter_rolling_window_set(
        StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
    staticTypeMap.put(StaticsType.acked, acked);

    RollingWindowSet failed = StatFunction
        .keyed_counter_rolling_window_set(
            StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
    staticTypeMap.put(StaticsType.failed, failed);

    RollingWindowSet process_latencies = StatFunction
        .keyed_avg_rolling_window_set(StatFunction.NUM_STAT_BUCKETS,
            StatBuckets.STAT_BUCKETS);

    staticTypeMap.put(StaticsType.process_latencies, process_latencies);
View Full Code Here


   * @param path
   * @param args
   */
  public void update_task_stat(StaticsType type, Object... args) {

    RollingWindowSet statics = staticTypeMap.get(type);
    if (statics != null) {
      statics.update_rolling_window_set(args);
    }
  }
View Full Code Here

    CommonStatsData ret = new CommonStatsData();

    for (Entry<StaticsType, RollingWindowSet> entry : staticTypeMap
        .entrySet()) {
      StaticsType type = entry.getKey();
      RollingWindowSet rws = entry.getValue();

      Map<Integer, Object> csData = rws.value_rolling_window_set();

      ret.put(type, csData);
    }

    return ret;
View Full Code Here

  protected void cleanup_common_stats() {

    for (Entry<StaticsType, RollingWindowSet> entry : staticTypeMap
        .entrySet()) {
      RollingWindowSet rws = entry.getValue();
      rws.cleanup_rolling_window_set();
    }

  }
View Full Code Here

TOP

Related Classes of com.alibaba.jstorm.stats.rolling.RollingWindowSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.