Passing jvm options to flink

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

Passing jvm options to flink

Vishwas Siravara
Hi ,
I am running flink on a standalone cluster without any resource manager like yarn or K8s. I am submitting my job using command line "flink run ..." . I have a couple of questions:

1.  How can I pass JVM parameters to this job. I want to pass a parameter for a dylib like this 
-Djava.library.path=/Users/vsiravar/temp/apollo/aipcryptoclient/lib . 

2. If I want to add an external directory on my server to my classpath , how can I do that ?

Thanks for all the help. I am truly grateful for all the help I have got building my flink app. 

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

Re: Passing jvm options to flink

Zhu Zhu
Hi Vishwas,

For question #1,
You can use env.java.opts to customize java opts for all flink JVMs, including JM and TM. 
Or you can use env.java.opts.jobmanager or env.java.opts.taskmanager accordingly for JM or TM.

For question  #2,
You can use -C to specify user classpaths when invoking flink run. The option description is as below,
"classloader on all nodes in the cluster. The paths must specify a protocol (e.g. file://) and be " + "accessible on all nodes (e.g. by means of a NFS share). You can use this option multiple " + "times for specifying more than one URL. The protocol must be supported by the " + "{@link java.net.URLClassLoader}."
I think it should work.

Thanks,
Zhu Zhu



Vishwas Siravara <[hidden email]> 于2019年8月8日周四 上午1:03写道:
Hi ,
I am running flink on a standalone cluster without any resource manager like yarn or K8s. I am submitting my job using command line "flink run ..." . I have a couple of questions:

1.  How can I pass JVM parameters to this job. I want to pass a parameter for a dylib like this 
-Djava.library.path=/Users/vsiravar/temp/apollo/aipcryptoclient/lib . 

2. If I want to add an external directory on my server to my classpath , how can I do that ?

Thanks for all the help. I am truly grateful for all the help I have got building my flink app. 

Thanks,
Vishwas