public class CodahaleGraphiteSink
extends java.lang.Object
implements org.apache.spark.metrics.sink.Sink
Sink
for Spark's
metric system that is tailored to report AggregatorMetric
s to Graphite.
The sink is configured using Spark configuration parameters, for example:
"spark.metrics.conf.*.sink.graphite.class"="org.apache.beam.runners.spark.structuredstreaming.metrics.sink.CodahaleGraphiteSink"
"spark.metrics.conf.*.sink.graphite.host"="<graphite_hostname>"
"spark.metrics.conf.*.sink.graphite.port"=<graphite_listening_port>
"spark.metrics.conf.*.sink.graphite.period"=10
"spark.metrics.conf.*.sink.graphite.unit"=seconds
"spark.metrics.conf.*.sink.graphite.prefix"="<optional_prefix>"
"spark.metrics.conf.*.sink.graphite.regex"="<optional_regex_to_send_matching_metrics>"
Constructor and Description |
---|
CodahaleGraphiteSink(java.util.Properties properties,
com.codahale.metrics.MetricRegistry metricRegistry)
Constructor for Spark 3.2.x and later.
|
CodahaleGraphiteSink(java.util.Properties properties,
com.codahale.metrics.MetricRegistry metricRegistry,
org.apache.spark.SecurityManager securityMgr)
Constructor for Spark 3.1.x and earlier.
|
Modifier and Type | Method and Description |
---|---|
void |
report() |
void |
start() |
void |
stop() |
public CodahaleGraphiteSink(java.util.Properties properties, com.codahale.metrics.MetricRegistry metricRegistry, org.apache.spark.SecurityManager securityMgr)
public CodahaleGraphiteSink(java.util.Properties properties, com.codahale.metrics.MetricRegistry metricRegistry)