hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-13167) The check for balancerCutoffTime is buggy
Date Wed, 11 Mar 2015 22:55:38 GMT

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

stack updated HBASE-13167:
--------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0
           Status: Resolved  (was: Patch Available)

> 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
>             Fix For: 2.0.0
>
>         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)

Mime
View raw message