Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-12831

HDFS throws FileNotFoundException on getFileBlockLocations(path-to-directory)

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 3.1.2
    • None
    • namenode
    • None

    Description

      The HDFS implementation of getFileBlockLocations(path, offset, len) throws an exception if the path references a directory.

      The base implementation (and all other filesystems) just return an empty array, something implemented in getFileBlockLocations(filestatsus, offset, len); something written up in filesystem.md as the correct behaviour.

      1. has been shown to break things: SPARK-14959
      2. there's no contract tests for these APIs; shows up in HADOOP-15044.
      3. even if this is considered a wontfix, it should raise something like PathIsDirectoryException rather than FNFE

      Attachments

        1. HDFS-12831.001.patch
          3 kB
          Hemanth Boyina

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hemanthboyina Hemanth Boyina
            stevel@apache.org Steve Loughran

            Dates

              Created:
              Updated:

              Slack

                Issue deployment