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/05/10 17:21:17 UTC

[incubator-pinot] branch fix-max-burst-qps created (now 08db875)

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

jlli pushed a change to branch fix-max-burst-qps
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at 08db875  Move maxBurstQps broker metric in createRateLimiter method

This branch includes the following new commits:

     new 08db875  Move maxBurstQps broker metric in createRateLimiter method

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: Move maxBurstQps broker metric in createRateLimiter method

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

jlli pushed a commit to branch fix-max-burst-qps
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 08db87567a3de64a0e07b466b6151d83a8161199
Author: Jack Li(Analytics Engineering) <jl...@jlli-mn1.linkedin.biz>
AuthorDate: Mon May 10 10:20:33 2021 -0700

    Move maxBurstQps broker metric in createRateLimiter method
---
 .../broker/queryquota/HelixExternalViewBasedQueryQuotaManager.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pinot-broker/src/main/java/org/apache/pinot/broker/queryquota/HelixExternalViewBasedQueryQuotaManager.java b/pinot-broker/src/main/java/org/apache/pinot/broker/queryquota/HelixExternalViewBasedQueryQuotaManager.java
index 21b08cc..6989e7d 100644
--- a/pinot-broker/src/main/java/org/apache/pinot/broker/queryquota/HelixExternalViewBasedQueryQuotaManager.java
+++ b/pinot-broker/src/main/java/org/apache/pinot/broker/queryquota/HelixExternalViewBasedQueryQuotaManager.java
@@ -200,6 +200,9 @@ public class HelixExternalViewBasedQueryQuotaManager implements ClusterChangeHan
         new QueryQuotaEntity(RateLimiter.create(perBrokerRate), new HitCounter(ONE_SECOND_TIME_RANGE_IN_SECOND),
             new MaxHitRateTracker(ONE_MINUTE_TIME_RANGE_IN_SECOND), onlineCount, overallRate, stat.getVersion());
     _rateLimiterMap.put(tableNameWithType, queryQuotaEntity);
+
+    _brokerMetrics.addCallbackTableGaugeIfNeeded(tableNameWithType, BrokerGauge.MAX_BURST_QPS,
+        () -> (long) queryQuotaEntity.getMaxQpsTracker().getMaxCountPerBucket());
     LOGGER.info(
         "Rate limiter for table: {} has been initialized. Overall rate: {}. Per-broker rate: {}. Number of online broker instances: {}. Table config stat version: {}",
         tableNameWithType, overallRate, perBrokerRate, onlineCount, stat.getVersion());
@@ -269,9 +272,6 @@ public class HelixExternalViewBasedQueryQuotaManager implements ClusterChangeHan
       LOGGER.debug("The percentage of rate limit capacity utilization is {}", percentageOfCapacityUtilization);
       _brokerMetrics.setValueOfTableGauge(tableNameWithType, BrokerGauge.QUERY_QUOTA_CAPACITY_UTILIZATION_RATE,
           percentageOfCapacityUtilization);
-
-      _brokerMetrics.addCallbackTableGaugeIfNeeded(tableNameWithType, BrokerGauge.MAX_BURST_QPS,
-          () -> (long) queryQuotaEntity.getMaxQpsTracker().getMaxCountPerBucket());
     }
 
     if (!rateLimiter.tryAcquire()) {

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