Apache Flink Dynamically setting JVM_OPT env.java.opts

半腔热情 提交于 2019-12-10 17:20:07

问题


Is it possible to set the custom JVM Options env.java.opts when submitting a job without specifying it in the conf/flink-conf.yaml file?

The reason I am asking is I want to use some custom variables in my log4j. I am also running my job on YARN.

I have tried the following command using the CLI and it strips everything off from the = sign onwards

$ flink run -m yarn-cluster -yn 2 -yst -yD env.java.opts="-DappName=myapp -DcId=mycId"


回答1:


At the moment this is not possible due to the way Flink parses the dynamic properties. Flink assumes that dynamic properties have the form -D<KEY>=<VALUE> and that <VALUE> does not contain any = which is clearly wrong. Thus, for the moment you have to specify the env.java.opts via flink-conf.yaml.

I've opened a JIRA issue to fix this problem.



来源:https://stackoverflow.com/questions/43940117/apache-flink-dynamically-setting-jvm-opt-env-java-opts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!