pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #3735: Implementing authentication for Pulsar Functions
Date Mon, 04 Mar 2019 16:39:20 GMT
sijie commented on a change in pull request #3735: Implementing authentication for Pulsar Functions
URL: https://github.com/apache/pulsar/pull/3735#discussion_r262141898
 
 

 ##########
 File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeSpawner.java
 ##########
 @@ -139,8 +139,30 @@ public void join() throws Exception {
         });
     }
 
+    /**
+     * Terminates the runtime
+     */
     @Override
     public void close() {
+        // cancel liveness checker before terminating runtime.
+        if (processLivenessCheckTimer != null) {
+            processLivenessCheckTimer.cancel(true);
+            processLivenessCheckTimer = null;
+        }
+        if (null != runtime) {
+            try {
+                runtime.terminate();
+            } catch (Exception e) {
+                log.warn("Failed to terminate function runtime: {}", e, e);
 
 Review comment:
   you are logging two `e`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message