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

Varun Vasudev commented on YARN-1713:
-------------------------------------

[~shanyu]

Thank you for the feedback!

bq. 1) Instead of requiring user to call two REST API (POST app/id and POST 
/app/{appid}), can we provide just one REST API to submit a YARN app? To be 
consistent with existing REST APIs, I think we should provide API "POST /apps". 
The web service handler for this API can first get an appid and then use the 
appid in ApplicationSubmissionContext using RPC.

Fair point. Let me think about this. The only reason I implemented it that way 
is that how the RPC implementation is set up.

bq. 2) I think we should include "user" parameter in AppSubmissionContextInfo, 
the data structure for web service, and call doAs() when submitting the app 
through RPC. Otherwise all app submitted through web service will appeared to 
be submitted by the user under which the RM process is running.

I'm not sure about this. The v5 implementation picks up the user name via the 
authentication filter setup by the administrator(via the 
getCallerUserGroupInformation(hsr) call) and then calls doAs() as that user. If 
we pick the user from the AppSubmissionContextInfo, a submitter can set it to 
any arbitrary user and we can't verify it.



> Implement getnewapplication and submitapp as part of RM web service
> -------------------------------------------------------------------
>
>                 Key: YARN-1713
>                 URL: https://issues.apache.org/jira/browse/YARN-1713
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Varun Vasudev
>            Assignee: Varun Vasudev
>         Attachments: apache-yarn-1713.3.patch, apache-yarn-1713.4.patch, 
> apache-yarn-1713.5.patch, apache-yarn-1713.cumulative.2.patch, 
> apache-yarn-1713.cumulative.3.patch, apache-yarn-1713.cumulative.4.patch, 
> apache-yarn-1713.cumulative.patch, apache-yarn-1713.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to