accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivakegg <...@git.apache.org>
Subject [GitHub] accumulo pull request #272: ACCUMULO-4654 Added the ability to continue bala...
Date Tue, 20 Jun 2017 17:47:40 GMT
Github user ivakegg commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/272#discussion_r123047295
  
    --- Diff: server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
---
    @@ -367,8 +396,30 @@ public long balance(SortedMap<TServerInstance,TabletServerStatus>
current, Set<K
         }
     
         if (migrations != null && migrations.size() > 0) {
    -      LOG.warn("Not balancing tables due to {} outstanding migrations", migrations.size());
    -      return minBalanceTime;
    +      if (migrations.size() >= maxOutstandingMigrations) {
    +        LOG.warn("Not balancing tables due to {} outstanding migrations", migrations.size());
    +        LOG.trace("Sample up to 10 outstanding migrations: {}", Iterables.limit(migrations,
10));
    --- End diff --
    
    Iterables.limit(migrations, 10) returns an object that wraps migrations.  It does not
return a String.  That object will not be converted into a String (via the toString() method)
until the log message is built.  In any case even the creation of the wrapped object does
take overhead so I will wrap this call as suggested.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message