You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/07/11 18:33:48 UTC
[GitHub] srkukarni commented on a change in pull request #2128: Schedule
task to update function stats separately
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