hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohith Sharma K S (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5571) [Atsv2] Query App REST endpoing need not to expose queryParams such userId/flowname/flowrunid
Date Mon, 29 Aug 2016 05:51:20 GMT

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

Rohith Sharma K S commented on YARN-5571:
-----------------------------------------

IIUC, userId and flowId is optional as a optimization avoiding an extra call. And flowrunid
is not at all even optional. Apps can be queried without flowrunid. API doc enforces to user
to provide flowrinid which is not mandatory. This is because of HBase schema structure *clusterId!userName!flowName!flowRunId!AppId*
where queries can be at flowName level.
{code}
userid - If specified, only entities belonging to this user will be returned. This query param
must be specified along with flowname and flowrunid query params, otherwise it will be ignored.
If userid, flowname and flowrunid are not specified, we would have to fetch flow context information
based on cluster and appid while executing the query.
{code}

I think API doc improvement can be done.

> [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