[
https://issues.apache.org/jira/browse/HDFS-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011712#comment-14011712
]
Andrew Wang commented on HDFS-6422:
-----------------------------------
I talked with Charles about this, and we're blocked until the WebHDFS XAttr
methods also throw an exception in the case where the names are not present.
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. We can either fix that here, or
do it in another JIRA first.
> getfattr in CLI doesn't throw exception or return non-0 return code when
> xattr doesn't exist
> --------------------------------------------------------------------------------------------
>
> Key: HDFS-6422
> URL: https://issues.apache.org/jira/browse/HDFS-6422
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.0.0
> Reporter: Charles Lamb
> Assignee: Charles Lamb
> Attachments: HDFS-6422.1.patch, HDFS-6422.2.patch, HDFS-6422.3.patch
>
>
> If you do
> hdfs dfs -getfattr -n user.blah /foo
> and user.blah doesn't exist, the command prints
> # file: /foo
> and a 0 return code.
> It should print an exception and return a non-0 return code instead.
--
This message was sent by Atlassian JIRA
(v6.2#6252)