@InterfaceAudience.Public @InterfaceStability.Evolving public class StatsDSink extends Object implements MetricsSink, Closeable
*.sink.statsd.class=org.apache.hadoop.metrics2.sink.StatsDSink [prefix].sink.statsd.server.host= [prefix].sink.statsd.server.port= [prefix].sink.statsd.skip.hostname=true|false (optional) [prefix].sink.statsd.service.name=NameNode (name you want for service)
Constructor and Description |
---|
StatsDSink() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush()
Flush any buffered metrics
|
void |
init(org.apache.commons.configuration.SubsetConfiguration conf)
Initialize the plugin
|
void |
putMetrics(MetricsRecord record)
Put a metrics record in the sink
|
void |
writeMetric(String line) |
public void init(org.apache.commons.configuration.SubsetConfiguration conf)
MetricsPlugin
init
in interface MetricsPlugin
conf
- the configuration object for the pluginpublic void putMetrics(MetricsRecord record)
MetricsSink
putMetrics
in interface MetricsSink
record
- the record to putpublic void writeMetric(String line)
public void flush()
MetricsSink
flush
in interface MetricsSink
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2019 Apache Software Foundation. All rights reserved.