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: ACCUMULO-4178: Updated the sender thread to...
Date Mon, 04 Apr 2016 17:47:58 GMT
Github user ivakegg commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/87#discussion_r58416898
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
---
    @@ -831,11 +814,16 @@ public void send(TabletServerMutations<Mutation> tsm) throws
AccumuloServerExcep
             try {
     
               long count = 0;
    -          for (List<Mutation> list : mutationBatch.values()) {
    -            count += list.size();
    +
    +          Set<Text> tableIds = new TreeSet<Text>();
    +          for (Map.Entry<KeyExtent,List<Mutation>> entry : mutationBatch.entrySet())
{
    +            count += entry.getValue().size();
    +            tableIds.add(entry.getKey().getTableId());
               }
    -          String msg = "sending " + String.format("%,d", count) + " mutations to " +
String.format("%,d", mutationBatch.size()) + " tablets at " + location;
    -          Thread.currentThread().setName(msg);
    +          StringBuilder msg = new StringBuilder();
    +          msg.append("sending ").append(String.format("%,d", count)).append(" mutations
to ").append(String.format("%,d", mutationBatch.size()))
    +              .append(" tablets for ").append(String.format("%,d", tableIds.size())).append("
tables ").append(tableIds).append(" to ").append(location);
    --- End diff --
    
    TreeSet already adds [].  Perhaps I should not depend on a toString method however and
do the work myself to ensure it is added correctly.


---
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