pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jerrypeng commented on a change in pull request #2128: Schedule task to update function stats separately
Date Thu, 12 Jul 2018 06:34:09 GMT
jerrypeng commented on a change in pull request #2128: Schedule task to update function stats
separately
URL: https://github.com/apache/incubator-pulsar/pull/2128#discussion_r201922848
 
 

 ##########
 File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerService.java
 ##########
 @@ -138,6 +148,14 @@ public void start(URI dlogUri) throws InterruptedException {
             // indicate function worker service is done intializing
             this.isInitialized = true;
 
+            this.connectorsManager = new ConnectorsManager(workerConfig);
+            
+            int metricsSamplingPeriodSec = this.workerConfig.getMetricsSamplingPeriodSec();
+            if (metricsSamplingPeriodSec > 0) {
+                this.statsUpdater.scheduleAtFixedRate(() -> this.functionRuntimeManager.updateRates(),
 
 Review comment:
   Why does this need to be done here? why can't each instance periodically reset their metrics
themselves?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message