You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2021/04/12 17:49:25 UTC

[incubator-pinot] branch hotfix-0.2.645 created (now dd4086e)

This is an automated email from the ASF dual-hosted git repository.

jlli pushed a change to branch hotfix-0.2.645
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at dd4086e  Fix broken timer properly (#6734)

This branch includes the following new commits:

     new dd4086e  Fix broken timer properly (#6734)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Fix broken timer properly (#6734)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch hotfix-0.2.645
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit dd4086e5fb614eb1841e710550d5282911eb8338
Author: Xiaoman Dong <xd...@uber.com>
AuthorDate: Thu Apr 1 00:01:31 2021 -0700

    Fix broken timer properly (#6734)
    
    * Fix broken timer properly
    
    * Fix broken build
    
    The missing import somehow got slipped in git diff
---
 .../java/org/apache/pinot/common/metrics/AbstractMetrics.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pinot-common/src/main/java/org/apache/pinot/common/metrics/AbstractMetrics.java b/pinot-common/src/main/java/org/apache/pinot/common/metrics/AbstractMetrics.java
index f8f0967..44a53c0 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/metrics/AbstractMetrics.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/metrics/AbstractMetrics.java
@@ -33,6 +33,7 @@ import org.apache.pinot.common.Utils;
 import org.apache.pinot.spi.metrics.PinotMeter;
 import org.apache.pinot.spi.metrics.PinotMetricName;
 import org.apache.pinot.spi.metrics.PinotMetricsRegistry;
+import org.apache.pinot.spi.metrics.PinotTimer;
 import org.apache.pinot.spi.utils.builder.TableNameBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -150,8 +151,11 @@ public abstract class AbstractMetrics<QP extends AbstractMetrics.QueryPhase, M e
    */
   private void addValueToTimer(String fullTimerName, final long duration, final TimeUnit timeUnit) {
     final PinotMetricName metricName = PinotMetricUtils.makePinotMetricName(_clazz, fullTimerName);
-    PinotMetricUtils.makePinotTimer(_metricsRegistry, metricName, TimeUnit.MILLISECONDS, TimeUnit.SECONDS);
-  }
+    PinotTimer timer = PinotMetricUtils.makePinotTimer(_metricsRegistry, metricName, TimeUnit.MILLISECONDS, TimeUnit.SECONDS);
+    if (timer != null) {
+      timer.update(duration, timeUnit);
+    }  
+   }
 
   /**
    * Logs a value to a meter.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org