sorry, i made a mistake
the version is hbase 0.94.12, 
class: DefaultLoadBalancer
method: balanceCluster
line: 250
    if (serversByLoad.lastKey().getLoad() <= ceiling &&
       serversByLoad.firstKey().getLoad() >= floor) {
      // Skipped because no server outside (min,max) range
      LOG.info("Skipping load balancing because balanced cluster; " +
        "servers=" + numServers + " " +
        "regions=" + numRegions + " average=" + average + " " +
        "mostloaded=" + serversByLoad.lastKey().getLoad() +
        " leastloaded=" + serversByLoad.firstKey().getLoad());
      return null;
    }

this log will be printed once for every table


in hbase0.94.12, the log is in class BaseLoadBalancer, line 404, and the log is 
trace, i think this is fine :
    if (!(cs.getMaxLoad() > ceiling || cs.getMinLoad() < floor)) {
      NavigableMap<ServerAndLoad, List<HRegionInfo>> serversByLoad = 
cs.getServersByLoad();
      if (LOG.isTraceEnabled()) {
        // If nothing to balance, then don't say anything unless trace-level 
logging.
        LOG.trace("Skipping load balancing because balanced cluster; " +
          "servers=" + cs.getNumServers() + " " +
          "regions=" + cs.getNumRegions() + " average=" + average + " " +
          "mostloaded=" + serversByLoad.lastKey().getLoad() +
          " leastloaded=" + serversByLoad.firstKey().getLoad());
      }
      return false;
    }




[email protected]
 
From: Ted Yu
Date: 2015-10-10 16:55
To: [email protected]
Subject: Re: simplify defaultLoadBalancer log
Here are the LoadBalancer classes in 0.98 branch:
 
/Users/tyu/98//hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
/Users/tyu/98//hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/FavoredNodeLoadBalancer.java
/Users/tyu/98//hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/SimpleLoadBalancer.java
/Users/tyu/98//hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
/Users/tyu/98//hbase-server/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
 
I took a look at BaseLoadBalancer.java and StochasticLoadBalancer.java but
didn't find the log around line 248.
 
Can you tell me which class you were looking at and give snippet of the
related code ?
 
Thanks
 
On Sat, Oct 10, 2015 at 1:51 AM, [email protected] <
[email protected]> wrote:
 
> hbase 0.98.10
> defaultLoadBalancer line248, the log is printed by table, one table will
> print a log,
> it seems that this log is too much and valueless, we can change the level
> from info to trace to simplify the log
> and can add a log say that the chore task is started.
>
>
>
> [email protected]
>

Reply via email to