[ 
https://issues.apache.org/jira/browse/HDFS-9015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ming Ma updated HDFS-9015:
--------------------------
    Attachment: HDFS-9015.patch

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.

> Refactor TestReplicationPolicy to test different block placement policies
> -------------------------------------------------------------------------
>
>                 Key: HDFS-9015
>                 URL: https://issues.apache.org/jira/browse/HDFS-9015
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Ming Ma
>         Attachments: HDFS-9015.patch
>
>
> TestReplicationPolicy can be parameterized so that default policy, upgrade 
> domain policy and other policies can share some common test cases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to