hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r772484 - in /hadoop/core/branches/branch-0.19: CHANGES.txt src/c++/libhdfs/hdfs.c
Date Thu, 07 May 2009 01:46:19 GMT
Author: cdouglas
Date: Thu May  7 01:46:18 2009
New Revision: 772484

URL: http://svn.apache.org/viewvc?rev=772484&view=rev
Log:
HADOOP-5579. Set errno correctly in libhdfs for permission, quota, and FNF
conditions. Contributed by Brian Bockelman

Modified:
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/c++/libhdfs/hdfs.c

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=772484&r1=772483&r2=772484&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Thu May  7 01:46:18 2009
@@ -108,6 +108,9 @@
     was used and user closed a output stream without writing any data.
     (Zheng Shao via dhruba)
 
+    HADOOP-5579. Set errno correctly in libhdfs for permission, quota, and FNF
+    conditions. (Brian Bockelman via cdouglas)
+
 Release 0.19.1 - 2009-02-23 
 
     HADOOP-5225. Workaround for tmp file handling in HDFS. sync() is 

Modified: hadoop/core/branches/branch-0.19/src/c++/libhdfs/hdfs.c
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/c%2B%2B/libhdfs/hdfs.c?rev=772484&r1=772483&r2=772484&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/c++/libhdfs/hdfs.c (original)
+++ hadoop/core/branches/branch-0.19/src/c++/libhdfs/hdfs.c Thu May  7 01:46:18 2009
@@ -124,12 +124,23 @@
       goto done;
     }
 
-    if (!strcmp(excClass, "org.apache.hadoop.fs.permission."
+    if (!strcmp(excClass, "org.apache.hadoop.security."
                 "AccessControlException")) {
         errnum = EACCES;
         goto done;
     }
 
+    if (!strcmp(excClass, "org.apache.hadoop.hdfs.protocol."
+                "QuotaExceededException")) {
+        errnum = EDQUOT;
+        goto done;
+    }
+
+    if (!strcmp(excClass, "java.io.FileNotFoundException")) {
+        errnum = ENOENT;
+        goto done;
+    }
+
     //TODO: interpret more exceptions; maybe examine exc.getMessage()
 
 default_error:



Mime
View raw message