Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.17.1
    • Fix Version/s: 0.19.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      any POSIX

    • Hadoop Flags:
      Reviewed
    • Release Note:
      Improved error reporting for libhdfs so permission problems now return EACCES.

      Description

      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.

      1. libhdfs-01-exception-handling.patch
        25 kB
        Ben Slusky
      2. libhdfs-02-meaningful-errno.patch
        34 kB
        Ben Slusky
      3. libhdfs-03-combined.patch
        39 kB
        Ben Slusky
      4. libhdfs-04.patch
        41 kB
        Ben Slusky

        Issue Links

          Activity

          Owen O'Malley made changes -
          Component/s libhdfs [ 12311345 ]
          Nigel Daley made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Robert Chansler made changes -
          Release Note Permission problems now return EACCES in errno from libhdfs. Improved error reporting for libhdfs so permission problems now return EACCES.
          Owen O'Malley made changes -
          Fix Version/s 0.19.0 [ 12313211 ]
          Owen O'Malley made changes -
          Release Note Permission problems now return EACCES in errno from libhdfs.
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hadoop Flags [Reviewed]
          Ben Slusky made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ben Slusky made changes -
          Attachment libhdfs-04.patch [ 12388246 ]
          Owen O'Malley made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Ben Slusky made changes -
          Link This issue is related to HADOOP-3536 [ HADOOP-3536 ]
          Ben Slusky made changes -
          Link This issue relates to HADOOP-3264 [ HADOOP-3264 ]
          Ben Slusky made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Affects Version/s 0.17.0 [ 12312913 ]
          Affects Version/s 0.17.1 [ 12313190 ]
          Ben Slusky made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Chris Douglas made changes -
          Assignee Ben Slusky [ sluskyb ]
          Status Open [ 1 ] Patch Available [ 10002 ]
          Chris Douglas made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Ben Slusky made changes -
          Attachment libhdfs-03-combined.patch [ 12383981 ]
          Ben Slusky made changes -
          Attachment libhdfs-01-exception-handling.patch [ 12383927 ]
          Attachment libhdfs-02-meaningful-errno.patch [ 12383928 ]
          Ben Slusky made changes -
          Field Original Value New Value
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ben Slusky created issue -

            People

            • Assignee:
              Ben Slusky
              Reporter:
              Ben Slusky
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development