Details

    • Type: Sub-task
    • 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

      Currently we use TreeMap for node2blocks, actually there are only two place may need sorted: dump, getDatanodes. But getDatanodes is called by computeInvalidateWork, and we do a shuffle there, so the sort is unnecssary. For dump, certainly we need to make few modification.
      So we can use HashMap.

      From memory and performance view, HashMap is better than TreeMap, a simliar optimization HDFS-7433.

      1. HDFS-8795.002.patch
        1 kB
        Yi Liu
      2. HDFS-8795.001.patch
        2 kB
        Yi Liu

        Activity

        Hide
        hitliuyi Yi Liu added a comment - - edited

        I think in dump, we don't need to have a sorted result, if agree, I can remove the modification in dump.

        Show
        hitliuyi Yi Liu added a comment - - edited I think in dump , we don't need to have a sorted result, if agree, I can remove the modification in dump .
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 18m 12s 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 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 8m 8s There were no new javac warning messages.
        +1 javadoc 10m 2s 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 1m 25s There were no new checkstyle issues.
        -1 whitespace 0m 0s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix.
        +1 install 1m 22s mvn install still works.
        +1 eclipse:eclipse 0m 36s The patch built with eclipse:eclipse.
        +1 findbugs 2m 37s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 native 3m 11s Pre-build of native portion
        -1 hdfs tests 160m 45s Tests failed in hadoop-hdfs.
            206m 44s  



        Reason Tests
        Failed unit tests hadoop.hdfs.server.namenode.ha.TestDNFencing
          hadoop.hdfs.server.namenode.TestFSImageWithAcl
          hadoop.hdfs.TestDistributedFileSystem



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12745822/HDFS-8795.001.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 9b272cc
        whitespace https://builds.apache.org/job/PreCommit-HDFS-Build/11739/artifact/patchprocess/whitespace.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11739/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11739/testReport/
        Java 1.7.0_55
        uname Linux asf903.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-HDFS-Build/11739/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 18m 12s 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 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 8m 8s There were no new javac warning messages. +1 javadoc 10m 2s 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 1m 25s There were no new checkstyle issues. -1 whitespace 0m 0s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 22s mvn install still works. +1 eclipse:eclipse 0m 36s The patch built with eclipse:eclipse. +1 findbugs 2m 37s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 3m 11s Pre-build of native portion -1 hdfs tests 160m 45s Tests failed in hadoop-hdfs.     206m 44s   Reason Tests Failed unit tests hadoop.hdfs.server.namenode.ha.TestDNFencing   hadoop.hdfs.server.namenode.TestFSImageWithAcl   hadoop.hdfs.TestDistributedFileSystem Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12745822/HDFS-8795.001.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 9b272cc whitespace https://builds.apache.org/job/PreCommit-HDFS-Build/11739/artifact/patchprocess/whitespace.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11739/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11739/testReport/ Java 1.7.0_55 uname Linux asf903.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-HDFS-Build/11739/console This message was automatically generated.
        Hide
        vinayrpet Vinayakumar B added a comment -

        I think in dump, we don't need to have a sorted result, if agree, I can remove the modification in dump.

        Yes, I also feel there is no need of result to be sorted.
        Since node2blocks will sort based on datanodes, not the blocks per node, Its fine not to have sorted result.

        Show
        vinayrpet Vinayakumar B added a comment - I think in dump, we don't need to have a sorted result, if agree, I can remove the modification in dump. Yes, I also feel there is no need of result to be sorted. Since node2blocks will sort based on datanodes, not the blocks per node, Its fine not to have sorted result.
        Hide
        hitliuyi Yi Liu added a comment -

        Thanks Vinayakumar B for review, update the patch to remove it.

        Show
        hitliuyi Yi Liu added a comment - Thanks Vinayakumar B for review, update the patch to remove it.
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        -1 pre-patch 17m 3s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 tests included 0m 0s 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 7m 35s There were no new javac warning messages.
        +1 javadoc 9m 36s 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 1m 20s 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 2m 30s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 native 3m 3s Pre-build of native portion
        -1 hdfs tests 161m 20s Tests failed in hadoop-hdfs.
            204m 48s  



        Reason Tests
        Failed unit tests hadoop.hdfs.TestDistributedFileSystem



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12746298/HDFS-8795.002.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 87f29c6
        Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-HDFS-Build/11767/artifact/patchprocess/trunkFindbugsWarningshadoop-hdfs.html
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11767/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11767/testReport/
        Java 1.7.0_55
        uname Linux asf909.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-HDFS-Build/11767/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 pre-patch 17m 3s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings. +1 @author 0m 0s The patch does not contain any @author tags. -1 tests included 0m 0s 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 7m 35s There were no new javac warning messages. +1 javadoc 9m 36s 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 1m 20s 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 2m 30s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 3m 3s Pre-build of native portion -1 hdfs tests 161m 20s Tests failed in hadoop-hdfs.     204m 48s   Reason Tests Failed unit tests hadoop.hdfs.TestDistributedFileSystem Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12746298/HDFS-8795.002.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 87f29c6 Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-HDFS-Build/11767/artifact/patchprocess/trunkFindbugsWarningshadoop-hdfs.html hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11767/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11767/testReport/ Java 1.7.0_55 uname Linux asf909.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-HDFS-Build/11767/console This message was automatically generated.
        Hide
        vinayrpet Vinayakumar B added a comment -

        +1

        Show
        vinayrpet Vinayakumar B added a comment - +1
        Hide
        hitliuyi Yi Liu added a comment -

        Thanks Vinayakumar B for review.
        The test failure is not related, committed to trunk and branch-2.

        Show
        hitliuyi Yi Liu added a comment - Thanks Vinayakumar B for review. The test failure is not related, committed to trunk and branch-2.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8200 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8200/)
        HDFS-8795. Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8200 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8200/ ) HDFS-8795 . Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #994 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/994/)
        HDFS-8795. Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #994 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/994/ ) HDFS-8795 . Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #264 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/264/)
        HDFS-8795. Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #264 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/264/ ) HDFS-8795 . Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2191 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2191/)
        HDFS-8795. Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2191 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2191/ ) HDFS-8795 . Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #253 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/253/)
        HDFS-8795. Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #253 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/253/ ) HDFS-8795 . Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #261 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/261/)
        HDFS-8795. Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #261 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/261/ ) HDFS-8795 . Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2210 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2210/)
        HDFS-8795. Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2210 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2210/ ) HDFS-8795 . Improve InvalidateBlocks#node2blocks. (yliu) (yliu: rev 4025326288c0167ff300d4f7ecc96f84ed141912) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development