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

NPE when listing a file with no location

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

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.22.0
    • 0.22.0
    • hdfs-client
    • None
    • Reviewed

    Description

      Lines listed below will caused a NullPointerException in DFSUtil.locatedBlocks2Locations (line 208) because EMPTY_BLOCK_LOCS will return null when calling blocks.getLocatedBlocks()

         /** a default LocatedBlocks object, its content should not be changed */
         private final static LocatedBlocks EMPTY_BLOCK_LOCS = new LocatedBlocks();
      

      Attachments

        1. nullLocatedBlocks.patch
          1 kB
          Hairong Kuang

        Activity

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

          People

            hairong Hairong Kuang
            hairong Hairong Kuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment