[ https://issues.apache.org/jira/browse/HBASE-13167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HBASE-13167: -------------------------- Assignee: Mikhail Antonov > The check for balancerCutoffTime is buggy > ----------------------------------------- > > Key: HBASE-13167 > URL: https://issues.apache.org/jira/browse/HBASE-13167 > Project: HBase > Issue Type: Bug > Components: Balancer > Affects Versions: 0.98.8 > Reporter: Tianyin Xu > Assignee: Mikhail Antonov > Attachments: HBASE-13167.patch > > > In HMaster, the checking logic for balancerCutoffTime in buggy. > See the following code: > {code:title=HMaster.java|borderStyle=solid} > 1419 private int getBalancerCutoffTime() { > 1420 int balancerCutoffTime = > 1421 getConfiguration().getInt("hbase.balancer.max.balancing", -1); > 1422 if (balancerCutoffTime == -1) { > 1423 // No time period set so create one > 1424 int balancerPeriod = > 1425 getConfiguration().getInt("hbase.balancer.period", 300000); > 1426 balancerCutoffTime = balancerPeriod; > 1427 // If nonsense period, set it to balancerPeriod > 1428 if (balancerCutoffTime <= 0) balancerCutoffTime = balancerPeriod; > 1429 } > 1430 return balancerCutoffTime; > 1431 } > {code} > Basically, the check for "nonsense period" is no effect, because > balancerCutoffTime is always assigned to be balancerPeriod whatever the value > is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)