You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by sa...@apache.org on 2018/10/12 03:08:02 UTC

[pulsar] branch master updated: For externally managed functions, function worker should not do metrics management (#2775)

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

sanjeevrk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 592737a  For externally managed functions, function worker should not do metrics management (#2775)
592737a is described below

commit 592737a201ee848881c5fa84b35c927e7cad75a2
Author: Sanjeev Kulkarni <sa...@gmail.com>
AuthorDate: Thu Oct 11 20:07:57 2018 -0700

    For externally managed functions, function worker should not do metrics management (#2775)
---
 .../org/apache/pulsar/functions/worker/FunctionRuntimeManager.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java
index 2514ff6..aa843ca 100644
--- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java
+++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java
@@ -651,6 +651,10 @@ public class FunctionRuntimeManager implements AutoCloseable{
     }
     
     public void updateRates() {
+        if (runtimeFactory.externallyManaged()) {
+            // We don't do metrics management for externally managed functions
+            return;
+        }
         for (Entry<String, FunctionRuntimeInfo> entry : this.functionRuntimeInfoMap.entrySet()) {
             RuntimeSpawner functionRuntimeSpawner = entry.getValue().getRuntimeSpawner();
             if (functionRuntimeSpawner != null) {