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

Ravi Prakash commented on HDFS-7766:
------------------------------------

Hi Haohui! Thanks for the clarification!

Doing everything via the Namenode is indeed an option, but it would make an 
already busy process even more busy. Moreover its not scalable as more and more 
clients may use the new HTML5 UI. The design of webhdfs where a datanode 
proxies all traffic is great for both purposes. I also have a working patch 
where the webhdfs endpoint is an HTTPFS proxy, which would then look like the 
same origin to the browser.

bq. previewing feature is disabled in the HTML5 UI.
I noticed. I actually have a working patch for enabling that feature after this 
patch gets in.

I acknowledge your point about adding functionality to webhdfs so that a 
browser may use it isn't ideal. I suspect though that creating an entirely new 
endpoint would be a lot more code to maintain (with authentication issues of 
its own).

> Add a flag to WebHDFS op=CREATE to not respond with a 307 redirect
> ------------------------------------------------------------------
>
>                 Key: HDFS-7766
>                 URL: https://issues.apache.org/jira/browse/HDFS-7766
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Ravi Prakash
>            Assignee: Ravi Prakash
>         Attachments: HDFS-7766.01.patch, HDFS-7766.02.patch, 
> HDFS-7766.03.patch, HDFS-7766.04.patch, HDFS-7766.04.patch, HDFS-7766.05.patch
>
>
> Please see 
> https://issues.apache.org/jira/browse/HDFS-7588?focusedCommentId=14276192&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14276192
> A backwards compatible manner we can fix this is to add a flag on the request 
> which would disable the redirect, i.e.
> {noformat}
> curl -i -X PUT 
> "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=CREATE[&noredirect=<true|false>]
> {noformat}
> returns 200 with the DN location in the response.
> This would allow the Browser clients to get the redirect URL to put the file 
> to.



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

Reply via email to