public abstract class AbstractGangliaSink extends Object implements MetricsSink
Modifier and Type | Class and Description |
---|---|
static class |
AbstractGangliaSink.GangliaConfType
define enum for various type of conf
|
static class |
AbstractGangliaSink.GangliaSlope
ganglia slope values which equal the ordinal
|
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE |
static int |
DEFAULT_DMAX |
static boolean |
DEFAULT_MULTICAST_ENABLED |
static int |
DEFAULT_MULTICAST_TTL |
static int |
DEFAULT_PORT |
static AbstractGangliaSink.GangliaSlope |
DEFAULT_SLOPE |
static int |
DEFAULT_TMAX |
static String |
DEFAULT_UNITS |
static String |
EQUAL |
protected org.apache.hadoop.metrics2.sink.ganglia.GangliaMetricVisitor |
gangliaMetricVisitor
Used for visiting Metrics
|
org.slf4j.Logger |
LOG |
static String |
MULTICAST_ENABLED_PROPERTY |
static String |
MULTICAST_TTL_PROPERTY |
static String |
SERVERS_PROPERTY |
static boolean |
SUPPORT_SPARSE_METRICS_DEFAULT |
static String |
SUPPORT_SPARSE_METRICS_PROPERTY |
Constructor and Description |
---|
AbstractGangliaSink() |
Modifier and Type | Method and Description |
---|---|
protected void |
emitToGangliaHosts()
Sends Ganglia Metrics to the configured hosts
|
void |
flush()
Flush any buffered metrics
|
protected org.apache.hadoop.metrics2.sink.ganglia.GangliaConf |
getGangliaConfForMetric(String metricName)
Lookup GangliaConf from cache.
|
protected String |
getHostName() |
void |
init(org.apache.commons.configuration.SubsetConfiguration conf)
Initialize the plugin
|
protected boolean |
isSupportSparseMetrics() |
protected void |
xdr_int(int i)
Puts an integer into the buffer as 4 bytes, big-endian.
|
protected void |
xdr_string(String s)
Puts a string into the buffer by first writing the size of the string as an
int, followed by the bytes of the string, padded if necessary to a multiple
of 4.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
putMetrics
public final org.slf4j.Logger LOG
public static final String DEFAULT_UNITS
public static final int DEFAULT_TMAX
public static final int DEFAULT_DMAX
public static final AbstractGangliaSink.GangliaSlope DEFAULT_SLOPE
public static final int DEFAULT_PORT
public static final boolean DEFAULT_MULTICAST_ENABLED
public static final int DEFAULT_MULTICAST_TTL
public static final String SERVERS_PROPERTY
public static final String MULTICAST_ENABLED_PROPERTY
public static final String MULTICAST_TTL_PROPERTY
public static final int BUFFER_SIZE
public static final String SUPPORT_SPARSE_METRICS_PROPERTY
public static final boolean SUPPORT_SPARSE_METRICS_DEFAULT
public static final String EQUAL
protected final org.apache.hadoop.metrics2.sink.ganglia.GangliaMetricVisitor gangliaMetricVisitor
public void init(org.apache.commons.configuration.SubsetConfiguration conf)
MetricsPlugin
init
in interface MetricsPlugin
conf
- the configuration object for the pluginpublic void flush()
MetricsSink
flush
in interface MetricsSink
protected org.apache.hadoop.metrics2.sink.ganglia.GangliaConf getGangliaConfForMetric(String metricName)
metricName
- protected String getHostName()
protected void xdr_string(String s)
s
- the string to be written to buffer at offset locationprotected void xdr_int(int i)
protected void emitToGangliaHosts() throws IOException
IOException
protected boolean isSupportSparseMetrics()
Copyright © 2019 Apache Software Foundation. All Rights Reserved.