[
https://issues.apache.org/jira/browse/HDFS-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13549474#comment-13549474
]
Steve Loughran commented on HDFS-3272:
--------------------------------------
# moving import statements complicates the patch -can you set your IDE up to
not do that
# case conversions must state the EN_US locale so as to avoid i18n problems
# good to see new tests -but there seems to be a lot of duplication in the
tests -writing the file, issuing the HTTP request, getting the response. Could
this be factored out into a common method/methods
> Make it possible to state MIME type for a webhdfs OPEN operation's result
> -------------------------------------------------------------------------
>
> Key: HDFS-3272
> URL: https://issues.apache.org/jira/browse/HDFS-3272
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: webhdfs
> Affects Versions: 1.0.1, 2.0.2-alpha
> Reporter: Steve Loughran
> Priority: Minor
> Attachments: HDFS-3272.patch
>
>
> when you do a GET from the browser with webhdfs, you get the file, but it
> comes over as a binary as the browser doesn't know what type it is. Having a
> mime mapping table and such like would be one solution, but another is simply
> to add a {{mime}} query parameter that would provide a string to be reflected
> back to the caller as the Content-Type header in the HTTP response.
> e.g.
> {code}
> http://ranier:50070/webhdfs/v1/results/Debounce/part-r-00000.csv?op=open&mime=text/csv
>
> {code}
> would generate a 307 redirect to the datanode, with the
> {code}
> http://dn1:50075/webhdfs/v1/results/Debounce/part-r-00000.csv?op=open&mime=text/csv
>
> {code}
> which would then generate the result
> {code}
> 200 OK
> Content-Type:text/csv
> GATE4,eb8bd736445f415e18886ba037f84829,55000,2007-01-14,14:01:54,
> GATE4,ec58edcce1049fa665446dc1fa690638,8030803000,2007-01-14,13:52:31,
> ...
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira