use of org.apache.hadoop.yarn.server.resourcemanager.metrics.TimelineServiceV1Publisher in project hadoop by apache.
the class ResourceManager method createSystemMetricsPublisher.
protected SystemMetricsPublisher createSystemMetricsPublisher() {
SystemMetricsPublisher publisher;
if (YarnConfiguration.timelineServiceEnabled(conf) && YarnConfiguration.systemMetricsPublisherEnabled(conf)) {
if (YarnConfiguration.timelineServiceV2Enabled(conf)) {
// we're dealing with the v.2.x publisher
LOG.info("system metrics publisher with the timeline service V2 is " + "configured");
publisher = new TimelineServiceV2Publisher(rmContext);
} else {
// we're dealing with the v.1.x publisher
LOG.info("system metrics publisher with the timeline service V1 is " + "configured");
publisher = new TimelineServiceV1Publisher();
}
} else {
LOG.info("TimelineServicePublisher is not configured");
publisher = new NoOpSystemMetricPublisher();
}
return publisher;
}
Aggregations