You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by ha...@apache.org on 2010/03/06 02:19:00 UTC

svn commit: r919680 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml

Author: hairong
Date: Sat Mar  6 01:18:59 2010
New Revision: 919680

URL: http://svn.apache.org/viewvc?rev=919680&view=rev
Log:
HDFS-1016. HDFS side change for HADOOP-6569. Contributed by Hairong Kuang.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
    hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=919680&r1=919679&r2=919680&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Sat Mar  6 01:18:59 2010
@@ -9,6 +9,10 @@
 
     HDFS-984. Persistent delegation tokens. (Jitendra Pandey via shv)
 
+    HDFS-1016. HDFS side change for HADOOP-6569. This jira changes the
+    error message on the screen when cat a directory or a 
+    non-existent file. (hairong)
+
   NEW FEATURES
 
     HDFS-654. Add support new atomic rename functionality in HDFS for 

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=919680&r1=919679&r2=919680&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Sat Mar  6 01:18:59 2010
@@ -737,7 +737,7 @@
       throws IOException, UnresolvedLinkException {
     INodeFile inode = dir.getFileINode(src);
     if (inode == null)
-      throw new FileNotFoundException(src);
+      throw new FileNotFoundException("File does not exist: " + src);
     assert !inode.isLink();
     if (doAccessTime && isAccessTimeSupported()) {
       dir.setTimes(src, inode, -1, now(), false);

Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml?rev=919680&r1=919679&r2=919680&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml (original)
+++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml Sat Mar  6 01:18:59 2010
@@ -5194,7 +5194,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: File does not exist: /file</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /file</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -5209,7 +5209,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: File does not exist: file</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /user/[a-z]*/file</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -5226,7 +5226,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: Source must be a file.</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /dir1</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -5243,7 +5243,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: File does not exist: dir</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /user/[a-z]*/dir</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -5317,7 +5317,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: File does not exist: hdfs:/file</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /file</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -5334,7 +5334,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: Source must be a file.</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /dir1</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -5409,7 +5409,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: File does not exist: hdfs://localhost[.a-z]*:[0-9]+/file</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /file</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -5426,7 +5426,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^cat: Source must be a file.</expected-output>
+          <expected-output>^cat: java.io.FileNotFoundException: File does not exist: /dir1</expected-output>
         </comparator>
       </comparators>
     </test>