Class GraphiteSink

java.lang.Object
org.apache.hadoop.metrics2.sink.GraphiteSink
All Implemented Interfaces:
Closeable, AutoCloseable, MetricsPlugin, MetricsSink

@Public @Evolving public class GraphiteSink extends Object implements MetricsSink, Closeable
A metrics sink that writes to a Graphite server.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    org.apache.hadoop.metrics2.sink.GraphiteSink.Graphite
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    Flush any buffered metrics
    void
    init(org.apache.commons.configuration2.SubsetConfiguration conf)
    Initialize the plugin
    void
    Put a metrics record in the sink

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraphiteSink

      public GraphiteSink()
  • Method Details

    • init

      public void init(org.apache.commons.configuration2.SubsetConfiguration conf)
      Description copied from interface: MetricsPlugin
      Initialize the plugin
      Specified by:
      init in interface MetricsPlugin
      Parameters:
      conf - the configuration object for the plugin
    • putMetrics

      public void putMetrics(MetricsRecord record)
      Description copied from interface: MetricsSink
      Put a metrics record in the sink
      Specified by:
      putMetrics in interface MetricsSink
      Parameters:
      record - the record to put
    • flush

      public void flush()
      Description copied from interface: MetricsSink
      Flush any buffered metrics
      Specified by:
      flush in interface MetricsSink
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException