How can I pass jvm options to flink when started from command line

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I pass jvm options to flink when started from command line

Vishwas Siravara
I understand that when I run a flink job from command line it forks a jvm and runs the main method and the flink related code run in the task manager. So when I say "flink run " the main does not run on JobManager hence it does not take env.java.options set in the flink-conf.yaml as this applies to the job manager and task manager. Now how can I pass jvm options like -Dconfig.resource=qa.conf from command line ? 

Thanks,
Vishwas 
Reply | Threaded
Open this post in threaded view
|

Re: How can I pass jvm options to flink when started from command line

Zhu Zhu
Hi Vishwas,

If what you want is to set JVM options for Flink client JVM when running jobs with "flink run", I think export the variable 'JVM_ARGS' does help.

Thanks,
Zhu Zhu 

Vishwas Siravara <[hidden email]> 于2019年8月15日周四 上午4:03写道:
I understand that when I run a flink job from command line it forks a jvm and runs the main method and the flink related code run in the task manager. So when I say "flink run " the main does not run on JobManager hence it does not take env.java.options set in the flink-conf.yaml as this applies to the job manager and task manager. Now how can I pass jvm options like -Dconfig.resource=qa.conf from command line ? 

Thanks,
Vishwas