srkukarni commented on a change in pull request #1373: Functions metrics 
prometheus
URL: https://github.com/apache/incubator-pulsar/pull/1373#discussion_r174323358
 
 

 ##########
 File path: 
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeSpawner.java
 ##########
 @@ -40,23 +41,39 @@
 
     @Getter
     private Runtime runtime;
-    private Timer metricsCollectionTimer;
+    private Timer processLivenessCheckTimer;
     private int numRestarts;
+    private Long instanceLivenessCheckFreqMs;
+
 
     public RuntimeSpawner(InstanceConfig instanceConfig,
                           String codeFile,
-                          RuntimeFactory containerFactory) {
+                          RuntimeFactory containerFactory, Long 
instanceLivenessCheckFreqMs) {
         this.instanceConfig = instanceConfig;
         this.runtimeFactory = containerFactory;
         this.codeFile = codeFile;
         this.numRestarts = 0;
+        this.instanceLivenessCheckFreqMs = instanceLivenessCheckFreqMs;
     }
 
     public void start() throws Exception {
         log.info("RuntimeSpawner starting function {} - {}", 
this.instanceConfig.getFunctionConfig().getName(),
                 this.instanceConfig.getInstanceId());
         runtime = runtimeFactory.createContainer(this.instanceConfig, 
codeFile);
         runtime.start();
+        // monitor function runtime to make sure it is running.  If not, 
restart the function runtime
 
 Review comment:
   shouldnt we check for null?

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


With regards,
Apache Git Services

Reply via email to