Naganarasimha G R commented on YARN-3390:

Thanks for the feedback [~zjshen] & [~sjlee0],
bq. either pass in the context per call or have a map of app id to context. I 
would favor the latter approach because it'd be easier on the perspective of 
callers of putEntities().
I too agree it will be easier easier on the perspective of callers of 
putEntities() but if we favor for map of {{app id to context}} 
* implicit assumption would be that {{putEntities(TimelineEntities ) }} will be 
for same appId(/will have have the same context)
* TimelineEntities as such do not have appID explicitly, so planning to modify 
{{TimelineCollector.getTimelineEntityContext()}} to  
{{TimelineCollector.getTimelineEntityContext(TimelineEntity.Identifier id)}} 
and subclasses of TimelineCollector can take care of mapping the Id to the  
Context (via AppId) if required.
* code of  {{putEntities(TimelineEntities)}}  would look something like 
    Iterator<TimelineEntity> iterator = entities.getEntities().iterator();
    TimelineEntity next = (iterator.hasNext())?iterator.next():null;
    if(null!=next) {
    TimelineCollectorContext context = 
    return writer.write(context.getClusterId(), context.getUserId(),
        context.getFlowId(), context.getFlowRunId(), context.getAppId(),

If its ok then shall i work on it  ?

> RMTimelineCollector should have the context info of each app
> ------------------------------------------------------------
>                 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
> 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