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

FSNamesystem#internalReleaseLease throws NullPointerException on a single-block file's lease recovery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.21.0, 0.22.0
    • 0.21.0
    • namenode
    • None
    • Reviewed

    Description

      FSNamesystem.internalReleaseLease() uses the result of iFile#numBlocks(); call to get a number of an under construction file's blocks. numBlock() can return 0 if the file doesn't have any blocks yet. This will cause internalReleaseLease() to throw ArrayIndexOutOfBoundException.

      In case of a single block file, the same method will throw NullPointerException because the penultimate block is going to be null according to the logic of INodeFile#getPenultimateBlock().

      Attachments

        1. HDFS-812.patch
          5 kB
          Konstantin I Boudnik
        2. HDFS-812.patch
          5 kB
          Konstantin I Boudnik
        3. HDFS-812.patch
          9 kB
          Konstantin I Boudnik
        4. HDFS-812.patch
          2 kB
          Konstantin I Boudnik
        5. HDFS-812.patch
          2 kB
          Konstantin I Boudnik

        Issue Links

          Activity

            People

              cos Konstantin I Boudnik
              cos Konstantin I Boudnik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: