hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject hadoop git commit: HDFS-7997. The first non-existing xattr should also throw IOException. (zhouyingchao via yliu)
Date Tue, 31 Mar 2015 13:21:40 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk b5a22e983 -> 3df61f303


HDFS-7997. The first non-existing xattr should also throw IOException. (zhouyingchao via yliu)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3df61f30
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3df61f30
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3df61f30

Branch: refs/heads/trunk
Commit: 3df61f303a8c0f5105661dc86fc3a34a60c49066
Parents: b5a22e9
Author: yliu <yliu@apache.org>
Authored: Tue Mar 31 21:17:44 2015 +0800
Committer: yliu <yliu@apache.org>
Committed: Tue Mar 31 21:17:44 2015 +0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                      | 3 +++
 .../org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java     | 3 ++-
 .../hadoop-hdfs/src/test/resources/testXAttrConf.xml             | 4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3df61f30/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 0bea916..e8075e6 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -392,6 +392,9 @@ Release 2.8.0 - UNRELEASED
     DatanodeDescriptor#updateHeartbeatState() (Brahma Reddy Battula via Colin
     P. McCabe)
 
+    HDFS-7997. The first non-existing xattr should also throw IOException.
+    (zhouyingchao via yliu)
+
 Release 2.7.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3df61f30/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java
index 45e63f2..d5c9124 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java
@@ -108,7 +108,8 @@ class FSDirXAttrOp {
       return filteredAll;
     }
     if (filteredAll == null || filteredAll.isEmpty()) {
-      return null;
+      throw new IOException(
+          "At least one of the attributes provided was not found.");
     }
     List<XAttr> toGet = Lists.newArrayListWithCapacity(xAttrs.size());
     for (XAttr xAttr : xAttrs) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3df61f30/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testXAttrConf.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testXAttrConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testXAttrConf.xml
index 9c66cba..c2e836c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testXAttrConf.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testXAttrConf.xml
@@ -420,8 +420,8 @@
       </cleanup-commands>
       <comparators>
       	<comparator>
-          <type>ExactComparator</type>
-          <expected-output># file: /file1#LF#</expected-output>
+          <type>SubstringComparator</type>
+          <expected-output>At least one of the attributes provided was not found</expected-output>
         </comparator>
       </comparators>
     </test>


Mime
View raw message