From commits-return-21360-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Wed Jan 17 18:35:31 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id B84B318062C for ; Wed, 17 Jan 2018 18:35:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A8A28160C25; Wed, 17 Jan 2018 17:35:31 +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 ECD76160C35 for ; Wed, 17 Jan 2018 18:35:30 +0100 (CET) Received: (qmail 16971 invoked by uid 500); 17 Jan 2018 17:35:30 -0000 Mailing-List: contact commits-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 commits@accumulo.apache.org Received: (qmail 16962 invoked by uid 99); 17 Jan 2018 17:35:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2018 17:35:30 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 238BA820B4; Wed, 17 Jan 2018 17:35:28 +0000 (UTC) Date: Wed, 17 Jan 2018 17:35:29 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] 01/03: ACCUMULO-4781 fixed logging performance issue (#359) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: kturner@apache.org In-Reply-To: <151621052800.16143.13932713504460204347@gitbox.apache.org> References: <151621052800.16143.13932713504460204347@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/1.7 X-Git-Reftype: branch X-Git-Rev: 03a610e489f266ccc44d182321fdc1731ac4d6f3 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180117173528.238BA820B4@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch 1.7 in repository https://gitbox.apache.org/repos/asf/accumulo.git commit 03a610e489f266ccc44d182321fdc1731ac4d6f3 Author: Keith Turner AuthorDate: Wed Jan 10 16:29:31 2018 -0500 ACCUMULO-4781 fixed logging performance issue (#359) --- .../org/apache/accumulo/tserver/TabletServer.java | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java index b4cbf03..9ac56ae 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java @@ -580,8 +580,11 @@ public class TabletServer extends AccumuloServerContext implements Runnable { if (ss != null) { long t2 = System.currentTimeMillis(); - log.debug(String.format("ScanSess tid %s %s %,d entries in %.2f secs, nbTimes = [%s] ", TServerUtils.clientAddress.get(), ss.extent.getTableId() - .toString(), ss.entriesReturned, (t2 - ss.startTime) / 1000.0, ss.nbTimes.toString())); + if (log.isDebugEnabled()) { + log.debug(String.format("ScanSess tid %s %s %,d entries in %.2f secs, nbTimes = [%s] ", TServerUtils.clientAddress.get(), ss.extent.getTableId() + .toString(), ss.entriesReturned, (t2 - ss.startTime) / 1000.0, ss.nbTimes.toString())); + } + if (scanMetrics.isEnabled()) { scanMetrics.add(TabletServerScanMetrics.SCAN, t2 - ss.startTime); scanMetrics.add(TabletServerScanMetrics.RESULT_SIZE, ss.entriesReturned); @@ -702,8 +705,11 @@ public class TabletServer extends AccumuloServerContext implements Runnable { } long t2 = System.currentTimeMillis(); - log.debug(String.format("MultiScanSess %s %,d entries in %.2f secs (lookup_time:%.2f secs tablets:%,d ranges:%,d) ", TServerUtils.clientAddress.get(), - session.numEntries, (t2 - session.startTime) / 1000.0, session.totalLookupTime / 1000.0, session.numTablets, session.numRanges)); + + if (log.isDebugEnabled()) { + log.debug(String.format("MultiScanSess %s %,d entries in %.2f secs (lookup_time:%.2f secs tablets:%,d ranges:%,d) ", TServerUtils.clientAddress.get(), + session.numEntries, (t2 - session.startTime) / 1000.0, session.totalLookupTime / 1000.0, session.numTablets, session.numRanges)); + } } @Override @@ -996,9 +1002,11 @@ public class TabletServer extends AccumuloServerContext implements Runnable { writeTracker.finishWrite(opid); } - log.debug(String.format("UpSess %s %,d in %.3fs, at=[%s] ft=%.3fs(pt=%.3fs lt=%.3fs ct=%.3fs)", TServerUtils.clientAddress.get(), us.totalUpdates, - (System.currentTimeMillis() - us.startTime) / 1000.0, us.authTimes.toString(), us.flushTime / 1000.0, us.prepareTimes.getSum() / 1000.0, - us.walogTimes.getSum() / 1000.0, us.commitTimes.getSum() / 1000.0)); + if (log.isDebugEnabled()) { + log.debug(String.format("UpSess %s %,d in %.3fs, at=[%s] ft=%.3fs(pt=%.3fs lt=%.3fs ct=%.3fs)", TServerUtils.clientAddress.get(), us.totalUpdates, + (System.currentTimeMillis() - us.startTime) / 1000.0, us.authTimes.toString(), us.flushTime / 1000.0, us.prepareTimes.getSum() / 1000.0, + us.walogTimes.getSum() / 1000.0, us.commitTimes.getSum() / 1000.0)); + } if (us.failures.size() > 0) { Entry first = us.failures.entrySet().iterator().next(); log.debug(String.format("Failures: %d, first extent %s successful commits: %d", us.failures.size(), first.getKey().toString(), first.getValue())); -- To stop receiving notification emails like this one, please contact "commits@accumulo.apache.org" .