Class MetricsConsumer

java.lang.Object
com.digitalpebble.stormcrawler.opensearch.metrics.MetricsConsumer
All Implemented Interfaces:
org.apache.storm.metric.api.IMetricsConsumer

public class MetricsConsumer extends Object implements 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer.TaskInfo taskInfo, Collection<org.apache.storm.metric.api.IMetricsConsumer.DataPoint> dataPoints)
     
    void
    prepare(Map stormConf, Object registrationArgument, org.apache.storm.task.TopologyContext context, org.apache.storm.task.IErrorReporter errorReporter)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      prepare in interface org.apache.storm.metric.api.IMetricsConsumer
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in interface org.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:
      handleDataPoints in interface org.apache.storm.metric.api.IMetricsConsumer