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

Remove duplicate code in FSDirectory#unprotectedConcat

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.6.0
    • namenode
    • None
    • Reviewed

    Description

      // update inodeMap
      removeFromInodeMap(Arrays.asList(allSrcInodes));
      

      this snippet of code is duplicate, since we already have the logic above it:

          for(INodeFile nodeToRemove: allSrcInodes) {
            if(nodeToRemove == null) continue;
            
            nodeToRemove.setBlocks(null);
            trgParent.removeChild(nodeToRemove, trgLatestSnapshot);
            inodeMap.remove(nodeToRemove);
            count++;
          }
      

      Attachments

        1. HDFS-6787.001.patch
          0.8 kB
          Yi Liu

        Activity

          People

            hitliuyi Yi Liu
            hitliuyi Yi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: