Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7541 Upgrade Domains in HDFS
  3. HDFS-9015

Refactor TestReplicationPolicy to test different block placement policies

    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:

      Description

      TestReplicationPolicy can be parameterized so that default policy, upgrade domain policy and other policies can share some common test cases.

        Activity

        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2386 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2386/)
        HDFS-9015. Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2386 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2386/ ) HDFS-9015 . Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #473 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/473/)
        HDFS-9015. Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #473 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/473/ ) HDFS-9015 . Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #481 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/481/)
        HDFS-9015. Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #481 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/481/ ) HDFS-9015 . Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2416 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2416/)
        HDFS-9015. Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2416 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2416/ ) HDFS-9015 . Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #446 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/446/)
        HDFS-9015. Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #446 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/446/ ) HDFS-9015 . Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #1210 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1210/)
        HDFS-9015. Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1210 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1210/ ) HDFS-9015 . Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        Hide
        mingma Ming Ma added a comment -

        Thanks Lei (Eddy) Xu!

        Show
        mingma Ming Ma added a comment - Thanks Lei (Eddy) Xu !
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8557 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8557/)
        HDFS-9015. Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8557 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8557/ ) HDFS-9015 . Refactor TestReplicationPolicy to test different block (lei: rev a68b6eb0f4110ba626a44fad6b9eb5d8c5a4901f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyWithNodeGroup.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicyConsiderLoad.java
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        Thanks for the work, Ming Ma.

        Committed to trunk and branch-2.

        Show
        eddyxu Lei (Eddy) Xu added a comment - Thanks for the work, Ming Ma . Committed to trunk and branch-2.
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        +1 LGTM.

        Show
        eddyxu Lei (Eddy) Xu added a comment - +1 LGTM.
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 9m 24s 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 4 new or modified test files.
        +1 javac 9m 19s There were no new javac warning messages.
        +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 1m 38s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 40s mvn install still works.
        +1 eclipse:eclipse 0m 40s 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 1m 28s Pre-build of native portion
        -1 hdfs tests 71m 39s Tests failed in hadoop-hdfs.
            98m 41s  



        Reason Tests
        Failed unit tests hadoop.hdfs.server.datanode.TestDirectoryScanner
        Timed out tests org.apache.hadoop.hdfs.server.namenode.TestSaveNamespace
          org.apache.hadoop.hdfs.qjournal.client.TestQJMWithFaults



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

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 9m 24s 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 4 new or modified test files. +1 javac 9m 19s There were no new javac warning messages. +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 38s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 40s mvn install still works. +1 eclipse:eclipse 0m 40s 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 1m 28s Pre-build of native portion -1 hdfs tests 71m 39s Tests failed in hadoop-hdfs.     98m 41s   Reason Tests Failed unit tests hadoop.hdfs.server.datanode.TestDirectoryScanner Timed out tests org.apache.hadoop.hdfs.server.namenode.TestSaveNamespace   org.apache.hadoop.hdfs.qjournal.client.TestQJMWithFaults Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12764381/HDFS-9015.patch Optional Tests javac unit findbugs checkstyle git revision trunk / 06abc57 hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/12751/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/12751/testReport/ Java 1.7.0_55 uname Linux asf901.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/12751/console This message was automatically generated.
        Hide
        mingma Ming Ma added a comment -

        The patch refactors TestReplicationPolicy* test code in the following ways:

        • Move common code to a new base class BaseReplicationPolicyTest.
        • Parameterize TestReplicationPolicy and TestReplicationPolicyConsiderLoad so that we can use the test code if they apply to other block placement policies.
        • TestReplicationPolicyConsiderLoad used to test only one default rack even though the test set up two racks for the DNs. That is because it calls dnManager.registerDatanode(dnr); which ends up resolving to the "/default-rack" network location instead of using the pre-built DatanodeDescriptors. The intention of the test case is to test the specified topology. The test case has been fixed to accomplish that.
        Show
        mingma Ming Ma added a comment - The patch refactors TestReplicationPolicy* test code in the following ways: Move common code to a new base class BaseReplicationPolicyTest . Parameterize TestReplicationPolicy and TestReplicationPolicyConsiderLoad so that we can use the test code if they apply to other block placement policies. TestReplicationPolicyConsiderLoad used to test only one default rack even though the test set up two racks for the DNs. That is because it calls dnManager.registerDatanode(dnr); which ends up resolving to the "/default-rack" network location instead of using the pre-built DatanodeDescriptors. The intention of the test case is to test the specified topology. The test case has been fixed to accomplish that.

          People

          • Assignee:
            mingma Ming Ma
            Reporter:
            mingma Ming Ma
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development