hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Lamb (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-6422) getfattr in CLI doesn't throw exception or return non-0 return code when xattr doesn't exist
Date Wed, 16 Jul 2014 22:37:04 GMT

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

Charles Lamb updated HDFS-6422:
-------------------------------

    Attachment: HDFS-6422.005.patch

I'm submitting this .005 patch for a jenkins run.

Some notes:

This patch changes XAttrNameParam.DOMAIN to match anything rather than try to check the xattr
namespace.

This causes the same exception string to be thrown from the xattr namespace check when webhdfs
is used as when the regular HDFS client is used.

Here are a few notes for the historical record:

Since WebHDFS doesn't unwrap exceptions, what is thrown is a RemoteException wrapping a HadoopIllegalArgumentException.
Using the regular HDFS client, a HadoopIllegalArgumentException is thrown. Any exception translation
would/should take place in WebHdfsFileSystem#runWithRetry.

The actual exception is generated server side in XAttrHelper.buildXAttr.

> 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, 2.5.0
>            Reporter: Charles Lamb
>            Assignee: Charles Lamb
>            Priority: Blocker
>         Attachments: HDFS-6422.005.patch, HDFS-6422.1.patch, HDFS-6422.2.patch, HDFS-6422.3.patch,
HDFS-6474.4.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)

Mime
View raw message