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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to