Sangjin Lee commented on YARN-3390:

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.
I'm fine with either approach. The main reason I thought of that is I wanted to 
be clear that the base implementation of putIfAbsent() and remove() is 
mandatory (i.e. not optional). Since we control all of it (base and 
subclasses), it might not be such a big deal either way.

> 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

Reply via email to