[
https://issues.apache.org/jira/browse/HBASE-24894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17179463#comment-17179463
]
Zheng Wang edited comment on HBASE-24894 at 8/18/20, 8:53 AM:
--------------------------------------------------------------
Oh, the reason is isOffPeakHour does not include the endhour, so if currentHour
is 23, it will fail.
{code:java}
@Override
public boolean isOffPeakHour(int targetHour) {
if (startHour <= endHour) {
return startHour <= targetHour && targetHour < endHour;
}
return targetHour < endHour || startHour <= targetHour;
}
{code}
We can just change this value to 24:
{code:java}
conf.setInt("hbase.offpeak.end.hour",23);{code}
was (Author: filtertip):
Oh, the reason is isOffPeakHour do not include the endhour, so if currentHour
is 23, it will fail.
{code:java}
@Override
public boolean isOffPeakHour(int targetHour) {
if (startHour <= endHour) {
return startHour <= targetHour && targetHour < endHour;
}
return targetHour < endHour || startHour <= targetHour;
}
{code}
We can just change this value to 24:
{code:java}
conf.setInt("hbase.offpeak.end.hour",23);{code}
> [Flakey Test] TestStochasticLoadBalancer.testMoveCostMultiplier
> ---------------------------------------------------------------
>
> Key: HBASE-24894
> URL: https://issues.apache.org/jira/browse/HBASE-24894
> Project: HBase
> Issue Type: Test
> Components: Balancer, master, test
> Affects Versions: 3.0.0-alpha-1, 2.3.0
> Reporter: Nick Dimiduk
> Assignee: Zheng Wang
> Priority: Major
>
> I've noticed this test has gotten flakey on a couple PRs. The only recent
> change to the class under test is HBASE-24709.
> Failure looks like:
> {noformat}
> [ERROR] Failures:
> [ERROR]
> org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer.testMoveCostMultiplier
> [ERROR] Run 1: TestStochasticLoadBalancer.testMoveCostMultiplier:304
> expected:<3.0> but was:<7.0>
> [ERROR] Run 2: TestStochasticLoadBalancer.testMoveCostMultiplier:304
> expected:<3.0> but was:<7.0>
> [ERROR] Run 3: TestStochasticLoadBalancer.testMoveCostMultiplier:304
> expected:<3.0> but was:<7.0>
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)