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

Steve Loughran commented on YARN-2031:
--------------------------------------

I think httpclient needs to be set to specifically handle 307 + PUT/POST, etc. 
Leaving basic redirect @302 reduces change on the GET calls.

The new ProxyUtility.sendRedirect() takes the HttpRequest as an argument, ready 
for the method to check the verb and choose the response code automatically. It 
could also consider returning something other than HTML if the input is, say, 
JSON. Though any automated client should just be discarding that.

Anyway: yes, get YARN-3147 in first. There's some tests in the proxy code on 
servlet handling of GET redirects; these can be supplemented with tests that 
check the other verbs. Then we look at the AM filter

> YARN Proxy model doesn't support REST APIs in AMs
> -------------------------------------------------
>
>                 Key: YARN-2031
>                 URL: https://issues.apache.org/jira/browse/YARN-2031
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.4.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>         Attachments: YARN-2031.patch.001
>
>
> AMs can't support REST APIs because
> # the AM filter redirects all requests to the proxy with a 302 response (not 
> 307)
> # the proxy doesn't forward PUT/POST/DELETE verbs
> Either the AM filter needs to return 307 and the proxy to forward the verbs, 
> or Am filter should not filter a REST bit of the web site



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

Reply via email to