jackjlli commented on a change in pull request #5724:
URL: https://github.com/apache/incubator-pinot/pull/5724#discussion_r458441365
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/queryquota/HelixExternalViewBasedQueryQuotaManager.java
##########
@@ -359,6 +372,27 @@ public void processQueryQuotaChange(ExternalView
currentBrokerResource) {
numRebuilt, _rateLimiterMap.size());
}
+ /**
+ * Process query quota state change when instance config gets changed
+ */
+ public void processQueryQuotaInstanceConfigChange() {
+ getQueryQuotaEnabledFlagFromInstanceConfig();
+ }
+
+ private void getQueryQuotaEnabledFlagFromInstanceConfig() {
+ Map<String, String> instanceConfigsMap =
+ HelixHelper.getInstanceConfigsMapFor(_instanceId,
_helixManager.getClusterName(),
+ _helixManager.getClusterManagmentTool());
+ String queryQuotaEnabled =
instanceConfigsMap.getOrDefault(CommonConstants.Helix.QUERY_QUOTA_STATE_ENABLED,
"true");
+ _enabled = Boolean.parseBoolean(queryQuotaEnabled);
+ LOGGER.info("Set query quota state to: {} for {} tables in the current
broker.", _enabled ? "ENABLE" : "DISABLE",
+ _rateLimiterMap.size());
Review comment:
I'd insist keeping the size of the map. That'll give us a good insight
on how many tables are affected by this state change.
And sure, I can add the state message in the message.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]