[ https://issues.apache.org/jira/browse/HDFS-7766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15148122#comment-15148122 ]
Haohui Mai commented on HDFS-7766: ---------------------------------- Uploading the files to HDFS is a valid use case. What concerns me is that the capability is added into WebHDFS directly -- the new behavior might block NN. It is much easier to write a WebHDFS client than abuse this capability than following the original behavior. For these use cases it is desirable to create new endpoints that is only used by the UI. What I propose is the following: * Create a new endpoint `api/ui` to upload the files. The endpoint has no guarantees on backward compatibility. It is only used by the UI. * To avoid misusage, the endpoint requires setting a custom header, e.g., `X-Hadoop-UI: true` in order to process the request. That way we can both goods of the world. Any thoughts? > 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)