Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-7352

FileSystem#listStatus should throw IOE upon access error

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Change FileSystem#listStatus contract to never return null. Local filesystems prior to 3.0.0 returned null upon access error. It is considered erroneous. We should expect FileSystem#listStatus to throw IOException upon access error.

      Description

      In HADOOP-6201 and HDFS-538 it was agreed that FileSystem::listStatus should throw FileNotFoundException instead of returning null, when the target directory did not exist.

      However, in LocalFileSystem implementation today, FileSystem::listStatus still may return null, when the target directory exists but does not grant read permission. This causes NPE in many callers, for all the reasons cited in HADOOP-6201 and HDFS-538. See HADOOP-7327 and its linked issues for examples.

        Attachments

        1. HADOOP-7352.001.patch
          8 kB
          John Zhuge
        2. HADOOP-7352.002.patch
          10 kB
          John Zhuge
        3. HADOOP-7352.003.patch
          10 kB
          John Zhuge
        4. HADOOP-7352.004.patch
          10 kB
          John Zhuge
        5. HADOOP-7352.005.patch
          10 kB
          John Zhuge

          Issue Links

            Activity

              People

              • Assignee:
                jzhuge John Zhuge
                Reporter:
                mattf Matt Foley
              • Votes:
                0 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: