Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12295

Improve NetworkTopology#InnerNode#remove logic

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      In NetworkTopology#InnerNode#remove, We can use childrenMap to get the parent node, no need to loop the children list. Then it is more efficient since in most cases deleting parent node doesn't happen.
      Another nit in current code is:

        String parent = n.getNetworkLocation();
        String currentPath = getPath(this);
      

      can be in closure of !isAncestor(n)

        Activity

        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2232 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2232/)
        HADOOP-12295. Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2232 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2232/ ) HADOOP-12295 . Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #283 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/283/)
        HADOOP-12295. Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #283 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/283/ ) HADOOP-12295 . Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #275 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/275/)
        HADOOP-12295. Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #275 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/275/ ) HADOOP-12295 . Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2213 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2213/)
        HADOOP-12295. Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2213 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2213/ ) HADOOP-12295 . Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #1016 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1016/)
        HADOOP-12295. Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1016 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1016/ ) HADOOP-12295 . Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #286 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/286/)
        HADOOP-12295. Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #286 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/286/ ) HADOOP-12295 . Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8293 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8293/)
        HADOOP-12295. Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8293 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8293/ ) HADOOP-12295 . Improve NetworkTopology#InnerNode#remove logic. (yliu) (yliu: rev 53bef9c5b98dee87d4ffaf35415bc38e2f876ed8) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
        Hide
        hitliuyi Yi Liu added a comment -

        Thanks Vinayakumar B for the review, committed to trunk and branch-2. I can address the comment if Chris has, thanks.

        Show
        hitliuyi Yi Liu added a comment - Thanks Vinayakumar B for the review, committed to trunk and branch-2. I can address the comment if Chris has, thanks.
        Hide
        vinayrpet Vinayakumar B added a comment -

        +1, looks fine to me.
        Hi Chris Douglas, Do you want to check once?

        Show
        vinayrpet Vinayakumar B added a comment - +1, looks fine to me. Hi Chris Douglas , Do you want to check once?
        Hide
        hadoopqa Hadoop QA added a comment -



        +1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 18m 59s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
        +1 javac 7m 43s There were no new javac warning messages.
        +1 javadoc 9m 44s There were no new javadoc warning messages.
        +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 2m 26s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 21s mvn install still works.
        +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse.
        +1 findbugs 4m 21s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 common tests 22m 29s Tests passed in hadoop-common.
        +1 hdfs tests 162m 23s Tests passed in hadoop-hdfs.
            230m 26s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12748448/HADOOP-12295.001.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 90b5104
        hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/artifact/patchprocess/testrun_hadoop-common.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/testReport/
        Java 1.7.0_55
        uname Linux asf900.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 18m 59s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 7m 43s There were no new javac warning messages. +1 javadoc 9m 44s There were no new javadoc warning messages. +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 2m 26s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 21s mvn install still works. +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse. +1 findbugs 4m 21s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 29s Tests passed in hadoop-common. +1 hdfs tests 162m 23s Tests passed in hadoop-hdfs.     230m 26s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12748448/HADOOP-12295.001.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 90b5104 hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/artifact/patchprocess/testrun_hadoop-common.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/testReport/ Java 1.7.0_55 uname Linux asf900.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7400/console This message was automatically generated.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development