Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 828D619BB7 for ; Mon, 4 Apr 2016 17:49:04 +0000 (UTC) Received: (qmail 7656 invoked by uid 500); 4 Apr 2016 17:49:04 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 7608 invoked by uid 500); 4 Apr 2016 17:49:04 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 7597 invoked by uid 99); 4 Apr 2016 17:49:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 17:49:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DF70DDFDEC; Mon, 4 Apr 2016 17:49:03 +0000 (UTC) From: ivakegg To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request: ACCUMULO-4178: Updated the sender thread to... Content-Type: text/plain Message-Id: <20160404174903.DF70DDFDEC@git1-us-west.apache.org> Date: Mon, 4 Apr 2016 17:49:03 +0000 (UTC) Github user ivakegg commented on a diff in the pull request: https://github.com/apache/accumulo/pull/87#discussion_r58417086 --- Diff: core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java --- @@ -831,11 +814,16 @@ public void send(TabletServerMutations tsm) throws AccumuloServerExcep try { long count = 0; - for (List list : mutationBatch.values()) { - count += list.size(); + + Set tableIds = new TreeSet(); + for (Map.Entry> 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(); --- End diff -- fair enough, but is there any downside to using it here? Especially if I am going to add the table ids myself instead of depending on the TreeSet implementation of toString().... --- 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. ---