Varun Saxena commented on YARN-4224:

Coming to the implementation, this pretty much makes us get the entities in a 
hierarchical fashion i.e. first get flows, then runs, then apps, and then 
generic entities. Because we want server to decide the delimiter instead of us 
fixing it.
This is fine for UI but in some use cases we might have to query app 
information directly. For instance, from CLI we fall back on AHS/ATS currently 
if app or containers are not found in RM.
We have to do the same in ATSv2.
In this case we have nothing to do with flows. And on the basis of user and app 
id(which we can have in YarnClient), ATSv2 can determine the flow context and 
complete the query.
Similarly, for getting containers from CLI, all we need is user, app id and 
entity type(YARN_CONTAINER). So getting the hierarchy(starting from flows) wont 
be required here. We can construct UID by ourselves in client by fixing the 
delimiter globally. Or pick it up form a config file. Or have the hierarchical 
REST endpoints as well in addition to UID ones for such cases. Or have a uid 
This needs to be discussed. cc [~sjlee0], [~djp]. Maybe we can discuss this in 
tomorrow's meeting as well.

Also, when we get flows, we can return UID for each flowrun in response. For 
each flowrun then we can then query all apps. And then for each app have 
another UID attached.
But when we query generic entities in ATSv2, we also have an extra parameter 
named entity type which we cannot send with each app(because generic entity 
type can be anything theoretically).

So we can have endpoints for entities as 
{{/entities/\[entity_type\]/\[entities_UID\]}} where UID is the UID we got from 
app response. In UI we can hardcode the entity type(currently it would be 
containers and app attempts).
Now for entity endpoint we can then have UID from result of entities endpoint. 
So entity type is not really required here. But should we have it for sake of 
consistency ?

> 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

This message was sent by Atlassian JIRA

Reply via email to