[ 
https://issues.apache.org/jira/browse/YARN-4224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15070133#comment-15070133
 ] 

Varun Saxena commented on YARN-4224:
------------------------------------

Based on tonight's discussion, UID endpoints can look as under :

{panel}
*Query multiple flows* : Endpoint is */ws/v2/timeline/flows or 
/ws/v2/timeline/\{clusterid\}/flows*. This query will return a UID of the form 
*cluster:user:flowname* for each flow name.
*Query multiple flowruns* : Endpoint is */ws/v2/timeline/flows/\{flow 
UID\}/runs* where flow UID is of the form *cluster:user:flowname* i.e. the one 
returned in query above. This query returns a UID of the form 
*cluster:user:flowname:runid* for each flow run.
*Query single flowrun* : Endpoint is */ws/v2/timeline/runs/\{flowrun UID\}* 
where flowrun UID is of the form *cluster:user:flowname:runid* i.e. the one 
returned in query above. This query also returns a UID of the form 
*cluster:user:flowname:runid* for the flowrun returned.
*Query multiple apps in a flowrun* : Endpoint can be 
*/ws/v2/timeline/runs/\{flowrun UID\}/apps* where flowrun UID is of the form 
*cluster:user:flowname:runid*. This query also returns a UID of the form 
*cluster:user:flowname:runid:appid* for each app ret
urned.
*Query single app* : Endpoint can be */ws/v2/timeline/apps/\{app UID\}* where 
app UID is of the form *cluster:user:flowname:runid:appid* i.e. the one 
returned in query above.
*Query Entities* : Endpoint can be */ws/v2/timeline/apps/\{app 
UID\}/entities/\{entitytype\}* or */ws/v2/timeline/apps/\{app 
UID\}/\{entitytype\}*. Thoughts ? Entity type is separate because we cannot 
know entity type when we query apps.This query also returns a UID of the form 
*cluster:user:flowname:runid:appid:entitytype:entityid* for each entity 
returned.
*Query Entity* : Endpoint can be */ws/v2/timeline/entities/\{entity UID\}* 
where entity UID is of the form 
*cluster:user:flowname:runid:appid:entitytype:entityid*
{panel}

* One more question we need to discuss is whether UID is really important to be 
sent from timeline reader ? Or client can construct it. Basically can Ember 
construct it ? Please note that things like users, flows, etc. i.e. flow 
context information will not be available in app query or entity query 
response. So Ember cannot easily fetch it from REST response. Or would it be 
easier for Ember if UID came in response.

If UID has to come in response, we can probably elevate it to TimelineEntity as 
an extra field. Also as discussed, construction of UID can be done in Timeline 
Reader Manager instead of storage layer.

cc [~sjlee0], [~gtCarrera9], [~leftnoteasy]
Lets reach a consensus and conclude this before holidays.

> Change the ATSv2 reader side REST interface to conform to current REST APIs' 
> in YARN
> ------------------------------------------------------------------------------------
>
>                 Key: YARN-4224
>                 URL: https://issues.apache.org/jira/browse/YARN-4224
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>              Labels: yarn-2928-1st-milestone
>         Attachments: YARN-4224-YARN-2928.01.patch, 
> YARN-4224-feature-YARN-2928.wip.02.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to