[
https://issues.apache.org/jira/browse/HDFS-5706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yu Li updated HDFS-5706:
------------------------
Affects Version/s: 2.2.0
> Should reset Balancer.Parameters.DEFALUT.policy in TestBalancer
> ---------------------------------------------------------------
>
> Key: HDFS-5706
> URL: https://issues.apache.org/jira/browse/HDFS-5706
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: balancer
> Affects Versions: 2.2.0
> Reporter: Yu Li
> Assignee: Yu Li
> Priority: Minor
>
> Now in TestBalancer.java, more than one test case will invoke the private
> method runBalancer, in which it will use Balancer.Parameters.Default, while
> the policy is never reset thus its totalUsedSpace and totalCapacity will
> increase continuously.
> We can reveal this issue by simply change
> {code:title=TestBalancer#testBalancer1Internal}
> testUnevenDistribution(conf,
> new long[] {50*CAPACITY/100, 10*CAPACITY/100},
> new long[]{CAPACITY, CAPACITY},
> new String[] {RACK0, RACK1});
> {code}
> to
> {code:title=TestBalancer#testBalancer1Internal}
> testUnevenDistribution(conf,
> new long[] {70*CAPACITY/100, 40*CAPACITY/100},
> new long[]{CAPACITY, CAPACITY},
> new String[] {RACK0, RACK1});
> {code}
> which in current implement, will cause none node under-replication thus cause
> the test case fail
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)