[ https://issues.apache.org/jira/browse/YARN-3390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14495645#comment-14495645 ]
Zhijie Shen commented on YARN-3390: ----------------------------------- bq. There I did a fairly similar (but not identical) refactoring of TimelineCollectorManager as part of isolating the core piece of the timeline collector manager independent of the NM-TS interaction, etc. So hopefully we can arrive at a version that can satisfy both needs. Interesting! It seems that we both find most of the code of TimelineCollectorManager in different places. I have quick glance and find two difference: 1. I change appId type from string to ApplicationId, because I think the strong type, ApplicationId, is more commonly used in YARN, while I see we have trivial conversion from string to ApplicationId and then to string again. 2. For putIfAbsent and remove, I don't use template method pattern, but let the subclass override the super class method and invoke it inside the override implementation, because I'm not sure if we will need pre process or post process, and if we only invoke the process when adding a new collector. If we're sure about template, I'm okay with the template pattern too. > 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 > > > 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)