public class LoggingMetricsConsumer extends Object implements IMetricsConsumer
Listens for all metrics, dumps them to log
To use, add this to your topology’s configuration:
conf.registerMetricsConsumer(org.apache.storm.metrics.LoggingMetricsConsumer.class, 1);
Or edit the storm.yaml config file:
topology.metrics.consumer.register:
- class: "org.apache.storm.metrics.LoggingMetricsConsumer"
parallelism.hint: 1
IMetricsConsumer.DataPoint, IMetricsConsumer.TaskInfo| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
LoggingMetricsConsumer() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
void |
handleDataPoints(IMetricsConsumer.TaskInfo taskInfo,
Collection<IMetricsConsumer.DataPoint> dataPoints) |
void |
prepare(Map stormConf,
Object registrationArgument,
TopologyContext context,
IErrorReporter errorReporter) |
public void prepare(Map stormConf, Object registrationArgument, TopologyContext context, IErrorReporter errorReporter)
prepare in interface IMetricsConsumerpublic void handleDataPoints(IMetricsConsumer.TaskInfo taskInfo, Collection<IMetricsConsumer.DataPoint> dataPoints)
handleDataPoints in interface IMetricsConsumerpublic void cleanup()
cleanup in interface IMetricsConsumerCopyright © 2019 The Apache Software Foundation. All Rights Reserved.