[
https://issues.apache.org/jira/browse/FLINK-21024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xintong Song closed FLINK-21024.
--------------------------------
Resolution: Fixed
Fixed via
* master (1.13): 1678b607ec16d58c595b40758192ed1d555b37d8
* release-1.12: b95cf42ccc78bc22394537370dfabd778cff2f03
> Dynamic properties get exposed to job's main method if user parameters are
> passed
> ---------------------------------------------------------------------------------
>
> Key: FLINK-21024
> URL: https://issues.apache.org/jira/browse/FLINK-21024
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Configuration
> Affects Versions: 1.12.1
> Reporter: Matthias
> Assignee: Xintong Song
> Priority: Major
> Labels: pull-request-available, starter
> Fix For: 1.13.0, 1.12.2
>
> Attachments: WordCount.jar
>
>
> A bug was identified in the [user
> ML|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-Application-cluster-standalone-job-some-JVM-Options-added-to-Program-Arguments-td40719.html]
> by Alexey exposing dynamic properties into the job user code.
> I was able to reproduce this issue by slightly adapting the WordCount example
> ({{org.apache.flink.streaming.examples.wordcount.WordCount2}} in attached
> [^WordCount.jar] ).
> Initiating a standalone job without using the {{--input}} parameter will
> result in printing an empty array:
> {code}
> ./bin/standalone-job.sh start --job-classname
> org.apache.flink.streaming.examples.wordcount.WordCount2
> {code}
> The corresponding {{*.out}} file looks like this:
> {code}
> []
> Executing WordCount2 example with default input data set.
> Use --input to specify file input.
> Printing result to stdout. Use --output to specify output path.
> {code}
> In contrast, initiating the standalone job using the {{--input}} parameter
> will expose the dynamic properties:
> {code}
> ./bin/standalone-job.sh start --job-classname
> org.apache.flink.streaming.examples.wordcount.WordCount2 --input
> /opt/flink/config/flink-conf.yaml
> {code}
> Resulting in the following output:
> {code}
> [--input, /opt/flink/config/flink-conf.yaml, -D,
> jobmanager.memory.off-heap.size=134217728b, -D,
> jobmanager.memory.jvm-overhead.min=201326592b, -D,
> jobmanager.memory.jvm-metaspace.size=268435456b, -D,
> jobmanager.memory.heap.size=1073741824b, -D,
> jobmanager.memory.jvm-overhead.max=201326592b]
> Printing result to stdout. Use --output to specify output path.
> {code}
> Interestingly, this cannot be reproduced on a local standalone session
> cluster.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)