Class MetricsConsumer
java.lang.Object
com.digitalpebble.stormcrawler.opensearch.metrics.MetricsConsumer
- All Implemented Interfaces:
org.apache.storm.metric.api.IMetricsConsumer
Sends metrics to an Elasticsearch index. The ES details are set in the configuration; an optional
argument sets a date format to append to the index name.
topology.metrics.consumer.register:
- class: "com.digitalpebble.stormcrawler.elasticsearch.metrics.MetricsConsumer"
parallelism.hint: 1
argument: "yyyy-MM-dd"
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.storm.metric.api.IMetricsConsumer
org.apache.storm.metric.api.IMetricsConsumer.DataPoint, org.apache.storm.metric.api.IMetricsConsumer.TaskInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()voidhandleDataPoints(org.apache.storm.metric.api.IMetricsConsumer.TaskInfo taskInfo, Collection<org.apache.storm.metric.api.IMetricsConsumer.DataPoint> dataPoints) voidprepare(Map stormConf, Object registrationArgument, org.apache.storm.task.TopologyContext context, org.apache.storm.task.IErrorReporter errorReporter)
-
Constructor Details
-
MetricsConsumer
public MetricsConsumer()
-
-
Method Details
-
prepare
public void prepare(Map stormConf, Object registrationArgument, org.apache.storm.task.TopologyContext context, org.apache.storm.task.IErrorReporter errorReporter) - Specified by:
preparein interfaceorg.apache.storm.metric.api.IMetricsConsumer
-
cleanup
public void cleanup()- Specified by:
cleanupin interfaceorg.apache.storm.metric.api.IMetricsConsumer
-
handleDataPoints
public void handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer.TaskInfo taskInfo, Collection<org.apache.storm.metric.api.IMetricsConsumer.DataPoint> dataPoints) - Specified by:
handleDataPointsin interfaceorg.apache.storm.metric.api.IMetricsConsumer
-