Search in sources :

Example 1 with StateMetric

use of org.apache.storm.metric.api.StateMetric in project storm by apache.

the class BuiltinMetricsUtil method registerQueueMetrics.

public static void registerQueueMetrics(Map queues, Map stormConf, TopologyContext context) {
    for (Object o : queues.entrySet()) {
        Map.Entry entry = (Map.Entry) o;
        String name = "__" + entry.getKey();
        IMetric metric = new StateMetric((IStatefulObject) entry.getValue());
        registerMetric(name, metric, stormConf, context);
    }
}
Also used : StateMetric(org.apache.storm.metric.api.StateMetric) IMetric(org.apache.storm.metric.api.IMetric) IStatefulObject(org.apache.storm.metric.api.IStatefulObject) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 IMetric (org.apache.storm.metric.api.IMetric)1 IStatefulObject (org.apache.storm.metric.api.IStatefulObject)1 StateMetric (org.apache.storm.metric.api.StateMetric)1