You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2016/04/05 17:23:18 UTC

[3/6] accumulo git commit: ACCUMULO-4178: Updated the sender thread to include the table ids in thread name.

ACCUMULO-4178: Updated the sender thread to include the table ids in thread name.

Closes apache/accumulo#87

Signed-off-by: Josh Elser <el...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/07124716
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/07124716
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/07124716

Branch: refs/heads/master
Commit: 071247167613b490bf6b722f97299fb8aca3c3a6
Parents: 2afc3dc
Author: Ivan Bella <iv...@bella.name>
Authored: Sun Apr 3 00:49:55 2016 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Tue Apr 5 11:19:07 2016 -0400

----------------------------------------------------------------------
 .../core/client/impl/TabletServerBatchWriter.java      | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07124716/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
index 491bcc1..35d1e49 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
@@ -31,6 +31,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.Timer;
 import java.util.TimerTask;
+import java.util.TreeSet;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -38,6 +39,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
+import com.google.common.base.Joiner;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriterConfig;
@@ -831,10 +833,15 @@ public class TabletServerBatchWriter {
         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;
+
+          String msg = "sending " + String.format("%,d", count) + " mutations to " + String.format("%,d", mutationBatch.size()) + " tablets at " + location
+              + " tids: [" + Joiner.on(',').join(tableIds) + ']';
           Thread.currentThread().setName(msg);
 
           Span span = Trace.start("sendMutations");