Search in sources :

Example 1 with AsmCounterSnapshot

use of com.alibaba.jstorm.common.metric.snapshot.AsmCounterSnapshot in project jstorm by alibaba.

the class AsmCounter method updateSnapshot.

@Override
protected void updateSnapshot(int window) {
    Counter counter = counterMap.get(window);
    if (counter != null) {
        AsmSnapshot snapshot = new AsmCounterSnapshot().setValue(counter.getCount()).setTs(System.currentTimeMillis()).setMetricId(metricId);
        snapshots.put(window, snapshot);
    }
}
Also used : Counter(com.codahale.metrics.Counter) AsmSnapshot(com.alibaba.jstorm.common.metric.snapshot.AsmSnapshot) AsmCounterSnapshot(com.alibaba.jstorm.common.metric.snapshot.AsmCounterSnapshot)

Aggregations

AsmCounterSnapshot (com.alibaba.jstorm.common.metric.snapshot.AsmCounterSnapshot)1 AsmSnapshot (com.alibaba.jstorm.common.metric.snapshot.AsmSnapshot)1 Counter (com.codahale.metrics.Counter)1