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

        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #1853 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1853/)
        HDFS-6787. Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1853 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1853/ ) HDFS-6787 . Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #1828 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1828/)
        HDFS-6787. Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1828 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1828/ ) HDFS-6787 . Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #634 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/634/)
        HDFS-6787. Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #634 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/634/ ) HDFS-6787 . Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #6008 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6008/)
        HDFS-6787. Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #6008 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6008/ ) HDFS-6787 . Remove duplicate code in FSDirectory#unprotectedConcat. Contributed by Yi Liu. (umamahesh: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1615622 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
        Hide
        Uma Maheswara Rao G added a comment -

        I have committed this to trunk and branch-2. Thanks a lot Yi!

        Show
        Uma Maheswara Rao G added a comment - I have committed this to trunk and branch-2. Thanks a lot Yi!
        Hide
        Yi Liu added a comment -

        Thank Uma, yes, I have debugged that inodes are cleaned correctly.

        Show
        Yi Liu added a comment - Thank Uma, yes, I have debugged that inodes are cleaned correctly.
        Hide
        Uma Maheswara Rao G added a comment -

        Make sense to me.
        +1 patch looks good to me.
        Did you verify that inodes cleaned properly by debug points or so? I assume, yes. Pls comment.

        Show
        Uma Maheswara Rao G added a comment - Make sense to me. +1 patch looks good to me. Did you verify that inodes cleaned properly by debug points or so? I assume, yes. Pls comment.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12658636/HDFS-6787.001.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7495//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7495//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12658636/HDFS-6787.001.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7495//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7495//console This message is automatically generated.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development