Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-812

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.21.0, 0.22.0
    • Fix Version/s: 0.21.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      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().

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

        Issue Links

          Activity

            People

            • Assignee:
              Konstantin Boudnik
              Reporter:
              Konstantin Boudnik
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development