Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-2802 Support for RW/RO snapshots in HDFS
  3. HDFS-4627

Fix FSImageFormat#Loader NPE and synchronization issues

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Snapshot (HDFS-2802)
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      1. Currently FSImageFormat#Loader#loadFilesUnderConstruction calls FSDirectory#unprotectedReplaceINodeFile without acquiring FSDirectory's lock. FSDirectory#replaceINodeFile should be called instead.
      2. Currently FSImage#Loader#loadINode does not create block[] object (i.e., keep it as null) when the length of the block is 0. This will cause NPE when the loaded INodeFile is empty, and then an append operation on this inode is applied from edit log.

        Attachments

        1. HDFS-4627.001.patch
          3 kB
          Jing Zhao
        2. HDFS-4627.002.patch
          5 kB
          Jing Zhao

          Activity

            People

            • Assignee:
              jingzhao Jing Zhao
              Reporter:
              jingzhao Jing Zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: