[
https://issues.apache.org/jira/browse/YARN-3040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14376749#comment-14376749
]
Sangjin Lee commented on YARN-3040:
-----------------------------------
Thanks [~zjshen] for the updated patch!
I am comfortable with continuing to work on the flow-related items in the
separate JIRA. I'll jot down the key points in that JIRA shortly.
I went over the latest patch, and overall it looks good. I do have a few
comments:
(AppLevelTimelineCollector.java)
{code}
50 protected void serviceInit(Configuration conf) throws Exception {
51 context.setClusterId(conf.get(YarnConfiguration.RM_CLUSTER_ID,
52 YarnConfiguration.DEFAULT_RM_CLUSTER_ID));
53
context.setUserId(UserGroupInformation.getCurrentUser().getShortUserName());
54
context.setFlowId(TimelineUtils.generateDefaultFlowIdBasedOnAppId(appId));
55 context.setFlowRunId("0");
56 context.setAppId(appId.toString());
{code}
I'm not sure of these set calls. Are these here just to initialize the context
to default values? For example, UGI.getCurrentUser().getShortUserName() would
return the user under which the daemon was started (whether it is NM or a
standalone daemon) in case of a per-node daemon, which is highly likely to be
incorrect. Do we need to bother setting default values if they are going to be
incorrect anyway, for example, for user?
At minimum, it would be helpful to have a comment here why this is being done.
(AMLauncher.java)
- Do we need to be case-insensitive here? I think we can be strict about the
tag names?
- You might want to be bit defensive about the tag not carrying any value (e.g.
"TIMELINE_FLOW_ID_TAG:"). If the value is empty, tag.substring() would throw an
IndexOutOfBoundsException.
> [Data Model] Make putEntities operation be aware of the app's context
> ---------------------------------------------------------------------
>
> Key: YARN-3040
> URL: https://issues.apache.org/jira/browse/YARN-3040
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: timelineserver
> Reporter: Sangjin Lee
> Assignee: Zhijie Shen
> Attachments: YARN-3040.1.patch, YARN-3040.2.patch, YARN-3040.3.patch
>
>
> Per design in YARN-2928, implement client-side API for handling *flows*.
> Frameworks should be able to define and pass in all attributes of flows and
> flow runs to YARN, and they should be passed into ATS writers.
> YARN tags were discussed as a way to handle this piece of information.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)