pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] srkukarni commented on a change in pull request #2128: Schedule task to update function stats separately
Date Wed, 11 Jul 2018 18:33:48 GMT
srkukarni 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_r201797566
 
 

 ##########
 File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
 ##########
 @@ -324,11 +326,23 @@ public ByteBuffer getState(String key) {
 
     @Override
     public void recordMetric(String metricName, double value) {
-        accumulatedMetrics.putIfAbsent(metricName, new AccumulatedMetricDatum());
-        accumulatedMetrics.get(metricName).update(value);
+        currentAccumulatedMetrics.putIfAbsent(metricName, new AccumulatedMetricDatum());
+        currentAccumulatedMetrics.get(metricName).update(value);
     }
 
     public MetricsData getAndResetMetrics() {
+        MetricsData retval = getMetrics();
 
 Review comment:
   what is this doing exactly?

----------------------------------------------------------------
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