[ 
https://issues.apache.org/jira/browse/HBASE-13167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14355715#comment-14355715
 ] 

Mikhail Antonov commented on HBASE-13167:
-----------------------------------------

Thanks [~apurtell]. It might be more conservative to limit max cutoff time to 
about 0.75 of period time, but current behavior sounds reasonable.

> 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
>         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)

Reply via email to