Package org.apache.hadoop.metrics2.sink
Class GraphiteSink
java.lang.Object
org.apache.hadoop.metrics2.sink.GraphiteSink
- All Implemented Interfaces:
Closeable,AutoCloseable,MetricsPlugin,MetricsSink
A metrics sink that writes to a Graphite server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classorg.apache.hadoop.metrics2.sink.GraphiteSink.Graphite -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()Flush any buffered metricsvoidinit(org.apache.commons.configuration2.SubsetConfiguration conf) Initialize the pluginvoidputMetrics(MetricsRecord record) Put a metrics record in the sink
-
Constructor Details
-
GraphiteSink
public GraphiteSink()
-
-
Method Details
-
init
public void init(org.apache.commons.configuration2.SubsetConfiguration conf) Description copied from interface:MetricsPluginInitialize the plugin- Specified by:
initin interfaceMetricsPlugin- Parameters:
conf- the configuration object for the plugin
-
putMetrics
Description copied from interface:MetricsSinkPut a metrics record in the sink- Specified by:
putMetricsin interfaceMetricsSink- Parameters:
record- the record to put
-
flush
public void flush()Description copied from interface:MetricsSinkFlush any buffered metrics- Specified by:
flushin interfaceMetricsSink
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-