Skip to content

[function] Fix expected health check interval - #2684

Merged
srkukarni merged 2 commits into
apache:masterfrom
sijie:fix_health_check_interval
Oct 2, 2018
Merged

[function] Fix expected health check interval#2684
srkukarni merged 2 commits into
apache:masterfrom
sijie:fix_health_check_interval

Conversation

@sijie

@sijie sijie commented Sep 30, 2018

Copy link
Copy Markdown
Member

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)

*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)
```
@sijie sijie added type/bug The PR fixed a bug or issue reported a bug area/function labels Sep 30, 2018
@sijie sijie added this to the 2.3.0 milestone Sep 30, 2018
@sijie sijie self-assigned this Sep 30, 2018

runtime = runtimeFactory.createContainer(this.instanceConfig, codeFile,
instanceLivenessCheckFreqMs * 1000);
instanceLivenessCheckFreqMs / 1000);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also rename "instanceLivenessCheckFreqMs" since it has "Ms" at the end to indicate its in milliseconds.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@srkukarni

Copy link
Copy Markdown
Contributor

run cpp tests

3 similar comments
@srkukarni

Copy link
Copy Markdown
Contributor

run cpp tests

@srkukarni

Copy link
Copy Markdown
Contributor

run cpp tests

@srkukarni

Copy link
Copy Markdown
Contributor

run cpp tests

@srkukarni
srkukarni merged commit 054a784 into apache:master Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/function type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants