use of org.apache.hadoop.yarn.server.nodemanager.timelineservice.NMTimelinePublisher in project hadoop by apache.
the class ContainerManagerImpl method createNMTimelinePublisher.
@VisibleForTesting
protected NMTimelinePublisher createNMTimelinePublisher(Context ctxt) {
NMTimelinePublisher nmTimelinePublisherLocal = new NMTimelinePublisher(ctxt);
addIfService(nmTimelinePublisherLocal);
return nmTimelinePublisherLocal;
}
use of org.apache.hadoop.yarn.server.nodemanager.timelineservice.NMTimelinePublisher in project hadoop by apache.
the class NMCollectorService method reportNewCollectorInfo.
@Override
public ReportNewCollectorInfoResponse reportNewCollectorInfo(ReportNewCollectorInfoRequest request) throws YarnException, IOException {
List<AppCollectorsMap> newCollectorsList = request.getAppCollectorsList();
if (newCollectorsList != null && !newCollectorsList.isEmpty()) {
Map<ApplicationId, String> newCollectorsMap = new HashMap<ApplicationId, String>();
for (AppCollectorsMap collector : newCollectorsList) {
ApplicationId appId = collector.getApplicationId();
String collectorAddr = collector.getCollectorAddr();
newCollectorsMap.put(appId, collectorAddr);
// set registered collector address to TimelineClient.
NMTimelinePublisher nmTimelinePublisher = context.getNMTimelinePublisher();
if (nmTimelinePublisher != null) {
nmTimelinePublisher.setTimelineServiceAddress(appId, collectorAddr);
}
}
((NodeManager.NMContext) context).addRegisteredCollectors(newCollectorsMap);
}
return ReportNewCollectorInfoResponse.newInstance();
}
Aggregations