hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars George <lars.geo...@gmail.com>
Subject Balancer Cutoff
Date Wed, 09 Nov 2016 10:14:00 GMT
Hi,

In HMaster.java we have this code (added, mostly, in HBASE-3422):

private int getBalancerCutoffTime() {
  int balancerCutoffTime =
    getConfiguration().getInt("hbase.balancer.max.balancing", -1);
  if (balancerCutoffTime == -1) {
    // No time period set so create one
    int balancerPeriod =
      getConfiguration().getInt("hbase.balancer.period", 300000);
    balancerCutoffTime = balancerPeriod;
    // If nonsense period, set it to balancerPeriod
    if (balancerCutoffTime <= 0) balancerCutoffTime = balancerPeriod;
  }
  return balancerCutoffTime;
}

Looking at these lines in particular, it seems that HBASE-8119 has
added the unconditional line, make the conditional obsolete:

    balancerCutoffTime = balancerPeriod;
    // If nonsense period, set it to balancerPeriod
    if (balancerCutoffTime <= 0) balancerCutoffTime = balancerPeriod;

Shall I just create a JIRA, patch and remove the conditional assignment?

And since the cut off time is not set, it defaults to the same 5mins
as the balancer period resolves to, making this basically a continuous
process, as the chore is calling balance every 5 mins, and it then
runs for 5 mins before stopping. How does this address the issue
reported in HBASE-3422?

Best,
Lars

Mime
View raw message