[
https://issues.apache.org/jira/browse/YARN-3390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14512013#comment-14512013
]
Sangjin Lee commented on YARN-3390:
-----------------------------------
It's still v.3 (as it includes a couple of other changes over v.2) but
putIfAbsent() should be basically back to v.2 (LOG.error should still be
LOG.info). In other words,
{code}
public TimelineCollector putIfAbsent(ApplicationId appId,
TimelineCollector collector) {
TimelineCollector collectorInTable = null;
synchronized (collectors) {
collectorInTable = collectors.get(appId);
if (collectorInTable == null) {
try {
// initialize, start, and add it to the collection so it can be
// cleaned up when the parent shuts down
collector.init(getConfig());
collector.start();
collectors.put(appId, collector);
LOG.info("the collector for " + appId + " was added");
collectorInTable = collector;
postPut(appId, collectorInTable);
} catch (Exception e) {
throw new YarnRuntimeException(e);
}
} else {
LOG.info("the collector for " + appId + " already exists!");
}
}
return collectorInTable;
}
{code}
How's that?
> Reuse TimelineCollectorManager for RM
> -------------------------------------
>
> Key: YARN-3390
> URL: https://issues.apache.org/jira/browse/YARN-3390
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: timelineserver
> Reporter: Zhijie Shen
> Assignee: Zhijie Shen
> Attachments: YARN-3390.1.patch, YARN-3390.2.patch, YARN-3390.3.patch
>
>
> RMTimelineCollector should have the context info of each app whose entity
> has been put
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)