accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [accumulo] 01/03: ACCUMULO-4781 fixed logging performance issue (#359)
Date Wed, 17 Jan 2018 17:35:29 GMT
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 <kturner@apache.org>
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<KeyExtent,Long> 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" <commits@accumulo.apache.org>.

Mime
View raw message