Class GangliaSink31
java.lang.Object
org.apache.hadoop.metrics2.sink.ganglia.AbstractGangliaSink
org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30
org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
- All Implemented Interfaces:
MetricsPlugin,MetricsSink
This code supports Ganglia 3.1
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.metrics2.sink.ganglia.AbstractGangliaSink
AbstractGangliaSink.GangliaConfType, AbstractGangliaSink.GangliaSlope -
Field Summary
FieldsFields inherited from class org.apache.hadoop.metrics2.sink.ganglia.AbstractGangliaSink
BUFFER_SIZE, DEFAULT_DMAX, DEFAULT_MULTICAST_ENABLED, DEFAULT_MULTICAST_TTL, DEFAULT_PORT, DEFAULT_SLOPE, DEFAULT_TMAX, DEFAULT_UNITS, EQUAL, gangliaMetricVisitor, MULTICAST_ENABLED_PROPERTY, MULTICAST_TTL_PROPERTY, SERVERS_PROPERTY, SUPPORT_SPARSE_METRICS_DEFAULT, SUPPORT_SPARSE_METRICS_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidemitMetric(String groupName, String name, String type, String value, org.apache.hadoop.metrics2.sink.ganglia.GangliaConf gConf, AbstractGangliaSink.GangliaSlope gSlope) The method sends metrics to Ganglia servers.Methods inherited from class org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30
appendPrefix, init, putMetricsMethods inherited from class org.apache.hadoop.metrics2.sink.ganglia.AbstractGangliaSink
emitToGangliaHosts, flush, getGangliaConfForMetric, getHostName, getMetricsServers, isSupportSparseMetrics, xdr_int, xdr_string
-
Field Details
-
LOG
public final org.slf4j.Logger LOG
-
-
Constructor Details
-
GangliaSink31
public GangliaSink31()
-
-
Method Details
-
emitMetric
protected void emitMetric(String groupName, String name, String type, String value, org.apache.hadoop.metrics2.sink.ganglia.GangliaConf gConf, AbstractGangliaSink.GangliaSlope gSlope) throws IOException The method sends metrics to Ganglia servers. The method has been taken from org.apache.hadoop.metrics.ganglia.GangliaContext31 with minimal changes in order to keep it in sync.- Overrides:
emitMetricin classGangliaSink30- Parameters:
groupName- The group name of the metricname- The metric nametype- The type of the metricvalue- The value of the metricgConf- The GangliaConf for this metricgSlope- The slope for this metric- Throws:
IOException- raised on errors performing I/O.
-