hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Saxena (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-5571) [Atsv2] Query App REST endpoing need not to expose queryParams such userId/flowname/flowrunid
Date Sun, 28 Aug 2016 10:13:20 GMT

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

Varun Saxena edited comment on YARN-5571 at 8/28/16 10:12 AM:
--------------------------------------------------------------

REST endpoints without clusters are just short URLs' for letting user query without cluster
ID if the client from which query is made belongs to the same cluster where timeline service
resides or if there is only one cluster. Here we will take cluster ID as value of RM Cluster
ID configuration by default.

GET /ws/v2/timeline/clusters/{cluster name}/apps/{app id} : Query for an App-id for an specified
cluster-name in pathParam. Here, queryParam is not useful right?
--> No, even here flow context information can be useful. When we are querying application,
the table to be queried is Application table. The row key while querying application includes
flow info as well because app belongs to a specific flow. But we do not make it mandatory.
Because we keep a mapping from {{app+cluster=>userid, flow,flowrun}} in app to flow table.
When a query arrives without flow info in query param, we will first look into AppToFlow Table
to find out flow context info based on app and cluster ID. And then use this info to finally
query application table. If flow context info is specified via query params, we do not need
to query app to flow table. 

GET /ws/v2/timeline/apps/{app id} : Query for an app-id for ALL the cluster from storage
--> No. This means query for an app assuming cluster is the same as the one in which ATS
is running.

For more info on the REST APIs', refer to ATSv2 documentation. We have a PDF attached in YARN-5174
which contains the latest documentation.
You can also refer to HBase Schema attached in YARN-2928.


was (Author: varun_saxena):
REST endpoints without clusters are just short URLs' for letting user query without cluster
ID if the client from which query is made belongs to the same cluster where timeline service
resides or if there is only one cluster. Here we will take cluster ID as value of RM Cluster
ID configuration by default.

GET /ws/v2/timeline/clusters/{cluster name}/apps/{app id} : Query for an App-id for an specified
cluster-name in pathParam. Here, queryParam is not useful right?
--> No. even here flow context information can be useful. When we are querying application,
the table to be queried is Application table. The row key while querying application includes
flow info as well because app belongs to a specific flow. But we do not make it mandatory.
Because we keep a mapping from app+cluster->userid, flow,flowrun in app to flow table.
When a query arrives without flow info in query param, we will first look into AppToFlow Table
to find out flow context info based on app and cluster ID. And then use this info to finally
query application table. If flow context info is specified via query params, we do not need
to query app to flow table. 

GET /ws/v2/timeline/apps/{app id} : Query for an app-id for ALL the cluster from storage
--> No. This means query for an app assuming cluster is the same as the one in which ATS
is running.

For more info on the REST APIs', refer to ATSv2 documentation. We have a PDF attached in YARN-5174
which contains the latest documentation.
You can also refer to HBase Schema attached in YARN-2928.

> [Atsv2] Query App REST endpoing need not to expose queryParams such userId/flowname/flowrunid
> ---------------------------------------------------------------------------------------------
>
>                 Key: YARN-5571
>                 URL: https://issues.apache.org/jira/browse/YARN-5571
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: timelinereader
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>
> Timeline reader provides REST end point for querying app with an URL {{GET /ws/v2/timeline/apps/\{app
id\}}} along with queryParam as an filter. But queryParam such as {{userId/flowname/flowrunid}}
not at useful for querying an app with app-id. In YARN cluster, only one app-id will be exist
though out life time. So userId/flowname/flowrunid not at all useful for the app-id REST empoint
> {noformat}
>   @GET
>   @Path("/apps/{appid}/")
>   @Produces(MediaType.APPLICATION_JSON)
>   public TimelineEntity getApp(
>       @Context HttpServletRequest req,
>       @Context HttpServletResponse res,
>       @PathParam("appid") String appId,
>       @QueryParam("flowname") String flowName,
>       @QueryParam("flowrunid") String flowRunId,
>       @QueryParam("userid") String userId,
>       @QueryParam("confstoretrieve") String confsToRetrieve,
>       @QueryParam("metricstoretrieve") String metricsToRetrieve,
>       @QueryParam("fields") String fields,
>       @QueryParam("metricslimit") String metricsLimit) {
>     return getApp(req, res, null, appId, flowName, flowRunId, userId,
>         confsToRetrieve, metricsToRetrieve, fields, metricsLimit);
>   }
> {noformat} 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message