Class ServiceMetricsSink
java.lang.Object
org.apache.hadoop.yarn.service.timelineservice.ServiceMetricsSink
- All Implemented Interfaces:
org.apache.hadoop.metrics2.MetricsPlugin,org.apache.hadoop.metrics2.MetricsSink
Write the metrics to a ATSv2. Generally, this class is instantiated via
hadoop-metrics2 property files. Specifically, you would create this class by
adding the following to by This would actually be set as:
[prefix].sink.[some instance name].class
=org.apache.hadoop.yarn.service.timelineservice.ServiceMetricsSink
, where prefix is "atsv2": and some instance name is
just any unique name, so properties can be differentiated if there are
multiple sinks of the same type created-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()voidinit(org.apache.commons.configuration2.SubsetConfiguration conf) voidputMetrics(org.apache.hadoop.metrics2.MetricsRecord record) Publishes service and component metrics to ATS.
-
Constructor Details
-
ServiceMetricsSink
public ServiceMetricsSink() -
ServiceMetricsSink
-
-
Method Details
-
putMetrics
public void putMetrics(org.apache.hadoop.metrics2.MetricsRecord record) Publishes service and component metrics to ATS.- Specified by:
putMetricsin interfaceorg.apache.hadoop.metrics2.MetricsSink
-
init
public void init(org.apache.commons.configuration2.SubsetConfiguration conf) - Specified by:
initin interfaceorg.apache.hadoop.metrics2.MetricsPlugin
-
flush
public void flush()- Specified by:
flushin interfaceorg.apache.hadoop.metrics2.MetricsSink
-