16 package org.openkilda.wfm.topology.stats.metrics;
30 import com.google.common.collect.ImmutableMap;
31 import org.apache.storm.tuple.Tuple;
32 import org.slf4j.Logger;
33 import org.slf4j.LoggerFactory;
50 LOGGER.debug(
"Meter config stats message: {}={}, component={}, stream={}",
59 for (Long meterId : reply.getMeterIds()) {
60 emit(timestamp, meterId, switchId);
68 private void emit(
long timestamp, Long meterId,
SwitchId switchId) {
70 Map<String, String> tags = ImmutableMap.of(
72 "meterId", meterId.toString()
74 collector.emit(
tuple(
"pen.switch.meters", timestamp, meterId, tags));
75 }
catch (JsonEncodeException e) {
76 LOGGER.error(
"Error during serialization of datapoint", e);
static final String MESSAGE_FIELD
OutputCollector collector
static List< Object > tuple(String metric, long timestamp, Number value, Map< String, String > tag)
void execute(Tuple input)
static final String CORRELATION_ID
Destination getDestination()
String getCorrelationId()