Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6787

Remove duplicate code in FSDirectory#unprotectedConcat

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • 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++;
          }
      

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development