hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r771599 - in /hadoop/core/trunk: CHANGES.txt src/c++/libhdfs/hdfs.c
Date Tue, 05 May 2009 07:18:34 GMT
Author: cdouglas
Date: Tue May  5 07:18:34 2009
New Revision: 771599

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

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/c++/libhdfs/hdfs.c

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=771599&r1=771598&r2=771599&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue May  5 07:18:34 2009
@@ -520,6 +520,9 @@
     HADOOP-3426. Fix/provide handling when DNS lookup fails on the loopback
     address. Also cache the result of the lookup. (Steve Loughran via cdouglas)
 
+    HADOOP-5579. Set errno correctly in libhdfs for permission, quota, and FNF
+    conditions. (Brian Bockelman via cdouglas)
+
 Release 0.20.1 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/c++/libhdfs/hdfs.c
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/c%2B%2B/libhdfs/hdfs.c?rev=771599&r1=771598&r2=771599&view=diff
==============================================================================
--- hadoop/core/trunk/src/c++/libhdfs/hdfs.c (original)
+++ hadoop/core/trunk/src/c++/libhdfs/hdfs.c Tue May  5 07:18:34 2009
@@ -125,12 +125,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