Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8D2FB200CBC for ; Tue, 20 Jun 2017 18:42:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8BEFE160BE1; Tue, 20 Jun 2017 16:42:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D402F160BCC for ; Tue, 20 Jun 2017 18:42:02 +0200 (CEST) Received: (qmail 44172 invoked by uid 500); 20 Jun 2017 16:42:02 -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 44159 invoked by uid 99); 20 Jun 2017 16:42:01 -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; Tue, 20 Jun 2017 16:42:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9BDFFDFB3A; Tue, 20 Jun 2017 16:42:01 +0000 (UTC) From: phrocker To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #270: ACCUMULO-4657 Reduce excessive logging / logging... Content-Type: text/plain Message-Id: <20170620164201.9BDFFDFB3A@git1-us-west.apache.org> Date: Tue, 20 Jun 2017 16:42:01 +0000 (UTC) archived-at: Tue, 20 Jun 2017 16:42:03 -0000 Github user phrocker commented on a diff in the pull request: https://github.com/apache/accumulo/pull/270#discussion_r123030301 --- Diff: server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java --- @@ -894,12 +894,19 @@ public static void removeBulkLoadEntries(Connector conn, String tableId, long ti BatchWriter bw = conn.createBatchWriter(MetadataTable.NAME, new BatchWriterConfig())) { mscanner.setRange(new KeyExtent(tableId, null, null).toMetadataRange()); mscanner.fetchColumnFamily(TabletsSection.BulkFileColumnFamily.NAME); + boolean shouldTrace = log.isTraceEnabled(); + String tidString = Long.toString(tid); for (Entry entry : mscanner) { - log.debug("Looking at entry " + entry + " with tid " + tid); - if (Long.parseLong(entry.getValue().toString()) == tid) { - log.debug("deleting entry " + entry); - Mutation m = new Mutation(entry.getKey().getRow()); - m.putDelete(entry.getKey().getColumnFamily(), entry.getKey().getColumnQualifier()); + if (shouldTrace) { + log.trace("Looking at entry " + entry + " with tid " + tidString); --- End diff -- Where was that blocking? The problem of using the log(string) is that it calls the forced logger, whereas using the message syntax as @dlmarion should bypass the synchronized check in the log4j category class ( if I recall correctly ). Can you double check that? --- 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. ---