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

Remove duplicate code in FSDirectory#unprotectedConcat

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.6.0
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: