[ 
https://issues.apache.org/jira/browse/HDFS-7997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14390626#comment-14390626
 ] 

Hudson commented on HDFS-7997:
------------------------------

FAILURE: Integrated in Hadoop-Hdfs-trunk #2082 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/2082/])
HDFS-7997. The first non-existing xattr should also throw IOException. 
(zhouyingchao via yliu) (yliu: rev 3df61f303a8c0f5105661dc86fc3a34a60c49066)
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testXAttrConf.xml
* 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java


> The first non-existing xattr should also throw IOException
> ----------------------------------------------------------
>
>                 Key: HDFS-7997
>                 URL: https://issues.apache.org/jira/browse/HDFS-7997
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: zhouyingchao
>            Assignee: zhouyingchao
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: HDFS-7997-001.patch
>
>
> We use the following code snippet to get/set xattrs. However, if there are no 
> xattrs have ever been set, the first getXAttr returns null and the second one 
> just throws exception with message like "At least one of the attributes 
> provided was not found.".  This is not expected, we believe they should 
> behave in the same way - i.e either both getXAttr returns null or both 
> getXAttr throw exception with the message "... not found".  We will provide a 
> patch to make them both throw exception.
> ....
> attrValueNM = fs.getXAttr(path, "nm");
> if (attrValueNM == null) {
>      fs.setXAttr("nm", DEFAULT_VALUE);
> }
> attrValueNN = fs.getXAttr(path, "nn");
> if (attrValueNN == null) {
>     fs.setXAttr("nn", DEFAULT_VALUE);
> }
> ....



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to