hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Abdelnur (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-3481) Refactor HttpFS handling of JAX-RS query string parameters
Date Mon, 25 Jun 2012 17:11:44 GMT

     [ https://issues.apache.org/jira/browse/HDFS-3481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Alejandro Abdelnur updated HDFS-3481:

    Attachment: HDFS-3481.patch

Thx Eli. 

The attached patch removes the commented return in the testcase (there was only one occurrence
of this).

The Parameter class, while a simple wrapper on Map, given its generic method simplifies access
to parameter values significantly, making the code cleaner, for example:

Using Parameters:

    String doAs = params.get(DoAsParam.NAME, DoAsParam.class);

Using Map:

    String doAs = ((DoAsParam.class)map.get(DoAsParam.NAME, DoAsParam.class)).value();

And it also removes access to all the Map API which are not relevant for this use (if we use
Map we'd had to wrap it in an unmodifiable MAP to avoid).

Regarding Using Guava ImmutableMap.of(), I'm getting similar warnings.

Finally, regarding sharing Param code with webhdfs. The idea is, once that webhdfs and httpfs
are 100% equivalent from a functional perspective (HDFS-3113 & HDFS-3509 would achieve
that), then we can tackle unify the code (HDFS-2645).
> Refactor HttpFS handling of JAX-RS query string parameters
> ----------------------------------------------------------
>                 Key: HDFS-3481
>                 URL: https://issues.apache.org/jira/browse/HDFS-3481
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 2.0.1-alpha
>            Reporter: Alejandro Abdelnur
>            Assignee: Alejandro Abdelnur
>             Fix For: 2.0.1-alpha
>         Attachments: HDFS-3481.patch, HDFS-3481.patch, HDFS-3481.patch
> Explicit parameters in the HttpFSServer became quite messy as they are the union of all
possible parameters for all operations.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message