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

Yi Liu updated HDFS-6464:
-------------------------

    Attachment: HDFS-6464.patch

The patch supports multiple xattr.name parameters for WebHDFS GETXATTRS instead 
of above approach of using xattr.names. It's more convenient for user input 
(Don't need to do separate and additional URL encoding).

Get a xattr:
{code}curl -i 
'http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=GETXATTRS&xattr.name=<XATTRNAME>&encoding=<ENCODING>'{code}

Get multiple xattrs (XATTRNAME1, XATTRNAME2, XATTRNAME3):
{code}curl -i 
'http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=GETXATTRS&xattr.name=<XATTRNAME1>&xattr.name=<XATTRNAME2>&xattr.name=<XATTRNAME3>&encoding=<ENCODING>'{code}

Get all xattrs:
{code}curl -i 
'http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=GETXATTRS&encoding=<ENCODING>'{code}

> Support multiple xattr.name parameters for WebHDFS getXAttrs.
> -------------------------------------------------------------
>
>                 Key: HDFS-6464
>                 URL: https://issues.apache.org/jira/browse/HDFS-6464
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 3.0.0
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>             Fix For: 3.0.0
>
>         Attachments: HDFS-6464.patch
>
>
> For WebHDFS getXAttrs through names, right now the entire list is passed to 
> the client side and then filtered, which is not the best choice since it's 
> inefficient and precludes us from doing server-side smarts on par with the 
> Java APIs. 
> Furthermore, if some xattrs doesn't exist, server side should return error.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to