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

public class ServiceMetricsSink extends Object implements 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 Details

    • ServiceMetricsSink

      public ServiceMetricsSink()
    • ServiceMetricsSink

      public ServiceMetricsSink(ServiceTimelinePublisher publisher)
  • Method Details

    • putMetrics

      public void putMetrics(org.apache.hadoop.metrics2.MetricsRecord record)
      Publishes service and component metrics to ATS.
      Specified by:
      putMetrics in interface org.apache.hadoop.metrics2.MetricsSink
    • init

      public void init(org.apache.commons.configuration2.SubsetConfiguration conf)
      Specified by:
      init in interface org.apache.hadoop.metrics2.MetricsPlugin
    • flush

      public void flush()
      Specified by:
      flush in interface org.apache.hadoop.metrics2.MetricsSink