[ https://issues.apache.org/jira/browse/YARN-4224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15053603#comment-15053603 ]
Wangda Tan edited comment on YARN-4224 at 12/11/15 9:38 PM: ------------------------------------------------------------ Thanks [~varun_saxena] working on this patch, Took a quick look at the proposal, two major suggestions: *1) I'm not sure if it is possible to avoid using deep hierarchy.* If a model has unique id, we can simplify query from: {{/ws/v2/timeline/users/\{userid\}/clusters/\{clusterid\}/apps/\{appid\}/}} To {{/ws/v2/timeline/apps/\{appid\}}}. If a mode doesn't have unique id (assume entitiy-id isn't unique), we should add its must-to-have "parent" id to the patch, for example: {{/ws/v2/timeline/apps/\{appid\}/entities/\{entities\}}}. The reason of doing this is, deep hierarchy needs lots of context, for example, if we're using above REST API to query a container status, we need to know it's user/cluster-id/app-id. We shouldn't assume client know all of them. *2) Batch query API* I didn't find batch query API example from the proposal. How about use standard JSON-API-like format? Which will look like: {{/ws/v2/timeline/apps?user=jimmy}}. And {{/ws/v2/timeline/apps/\{appid\}/entities?startTime=20151211}} You can take a look at http://jsonapi.org/examples/ for more details. Thoughts? [~vinodkv], [~Naganarasimha]. was (Author: leftnoteasy): Thanks [~varun_saxena] working on this patch, Took a quick look at the proposal, two major suggestions: *1) I'm not sure if it is possible to avoid using deep hierarchy.* If a model has unique id, we can simplify query from: {{/ws/v2/timeline/users/{userid}/clusters/{clusterid}/apps/{appid}/}} To {{/ws/v2/timeline/apps/{appid}}}. If a mode doesn't have unique id (assume entitiy-id isn't unique), we should add its must-to-have "parent" id to the patch, for example: {{/ws/v2/timeline/apps/{appid}}}/entities/{entities}}}. The reason of doing this is, deep hierarchy needs lots of context, for example, if we're using above REST API to query a container status, we need to know it's user/cluster-id/app-id. We shouldn't assume client know all of them. *2) Batch query API* I didn't find batch query API example from the proposal. How about use standard JSON-API-like format? Which will look like: {{/ws/v2/timeline/apps?user=jimmy}}. You can take a look at http://jsonapi.org/examples/ for more details. Thoughts? [~vinodkv], [~Naganarasimha]. > 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 > Attachments: YARN-4224-YARN-2928.01.patch > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)