[ 
https://issues.apache.org/jira/browse/HADOOP-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Slusky updated HADOOP-3549:
-------------------------------

    Attachment: libhdfs-03-combined.patch

Ok, so layered diffs are bad. Good to know. This is a combined diff against 
trunk. I removed the translation of DiskOutOfSpaceException to ENOSPC, since 
DiskOutOfSpaceException is apparently not thrown in the client.

Testing this automatically is a tricky business. AFAICT all hdfs tests are run 
as the superuser, so there's no way to trigger EACCES. I had written up a test 
to trigger ENOSPC, only to find that the exception that gets thrown when you 
fill up the disk is ambiguous (not to mention different from DFS to local FS).

> meaningful errno values in libhdfs
> ----------------------------------
>
>                 Key: HADOOP-3549
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3549
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: libhdfs
>    Affects Versions: 0.17.0
>         Environment: any POSIX
>            Reporter: Ben Slusky
>         Attachments: libhdfs-01-exception-handling.patch, 
> libhdfs-02-meaningful-errno.patch, libhdfs-03-combined.patch
>
>
> A comment near the top of hdfs.h says that "All APIs set errno to meaningful 
> values." Unfortunately this is a big fat lie -- bigger and fatter still now 
> that we have permissions in HDFS. If Hadoop throws an AccessControlException, 
> then libhdfs sets errno to EINTERNAL, even though this is not an "internal" 
> error in any sense of the word.
> With the attached patches, allow libhdfs to derive a useful errno value when 
> an exception is thrown. I've implemented handling for AccessControlException 
> and a few others whose semantics seem obvious.
> Tangential question: The signatures for invokeMethod() and 
> constructNewObjectOfClass() in hdfsJniHelper.h disagreed with their comments. 
> Was the "exc" argument of those functions removed in the past, or never 
> implemented? I (re)instated it in my patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to