[function] Fix expected health check interval - #2684
Merged
Conversation
*Motivation* Java instance main is expecting health check interval in seconds. *Changes Make sure the health check interval is passed in seconds. *Tests* It fixes following issue ``` 14:36:29.528 [FunctionActionerThread] INFO org.apache.pulsar.functions.runtime.ProcessRuntime - Started process successfully Exception in thread "main" java.lang.IllegalArgumentException at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:565) at java.util.concurrent.Executors$DelegatedScheduledExecutorService.scheduleAtFixedRate(Executors.java:735) at org.apache.pulsar.functions.runtime.JavaInstanceMain.start(JavaInstanceMain.java:154) at org.apache.pulsar.functions.runtime.JavaInstanceMain.main(JavaInstanceMain.java:185) ```
srkukarni
approved these changes
Oct 1, 2018
jerrypeng
reviewed
Oct 1, 2018
|
|
||
| runtime = runtimeFactory.createContainer(this.instanceConfig, codeFile, | ||
| instanceLivenessCheckFreqMs * 1000); | ||
| instanceLivenessCheckFreqMs / 1000); |
Contributor
There was a problem hiding this comment.
we should also rename "instanceLivenessCheckFreqMs" since it has "Ms" at the end to indicate its in milliseconds.
Member
Author
There was a problem hiding this comment.
I don't understand your comment here. "instanceLivenessCheckFreqMs" is in milliseconds, and have "ms" at the end is clear. Here we divide it by 1000 to convert it to seconds.
Contributor
|
run cpp tests |
3 similar comments
Contributor
|
run cpp tests |
Contributor
|
run cpp tests |
Contributor
|
run cpp tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Java instance main is expecting health check interval in seconds.
*Changes
Make sure the health check interval is passed in seconds.
Tests
It fixes following issue