Repository navigation
[BEAM-6058] Adding option for flink configuration directory and setting config in exectution environment - #7031
Conversation
|
Run Python Flink ValidatesRunner |
|
Run Flink ValidatesRunner |
mxm
left a comment
There was a problem hiding this comment.
This makes sense. Before portability, users used the Flink config of the cluster, now they need a different way to provide the config.
|
|
||
| @Description("Directory containing Flink YAML configuration files.") | ||
| @Nullable | ||
| String getFlinkConfigDir(); |
There was a problem hiding this comment.
Looks good. Could you test the default in PipelineOptionstest#testDefaults?
There was a problem hiding this comment.
Makes sense. Updated the test.
tweise
left a comment
There was a problem hiding this comment.
Please document why/when this is required (JIRA is blank and it isn't obvious). It's not specific to portable execution, assuming the job server executes on the host where the old Flink runner would run otherwise.
|
I think this is required to load a custom config for portability. If you submit the "legacy" way, you would have a Flink installation with a custom config which would be automatically discovered. |
Same applies in either case (which is why we need documentation). In portability case the job server replaces the legacy runner and it would discover that configuration (that's how we run the job server in Lyft). |
|
I agree that we should document the reason for changes in JIRA. How do you let the JobServer discover the config? Via the Java property? |
|
The machine has Flink installed and |
|
Some configuration entries needs to be available at JobGraph creation time, which will occur inside the JobServer. The JobServer currently doesn't have a way to load the Flink config. |
|
Properties like taskmanager.runtime.large-record-handler are read from the submitted JobGraph and are not read from cluster config when using RemoteEnvironment. Hence we need to read and set the properties in the job graph. Many of these properties are not even exposed via ExecutionConfig so we need to read these properties directly. |
|
Also updated the jira with more details. |
9f21bdb to
bf8b452
Compare
|
@tweise Reminder for review :) |
| @Nullable | ||
| String getFlinkConfigDir(); | ||
|
|
||
| void setFlinkConfigDir(@Nullable String value); |
There was a problem hiding this comment.
As discussed in the JIRA, the better place for this is the JobServer configuration. Sorry for the hassle.
There was a problem hiding this comment.
Sounds reasonable. I will move it their.
|
Something that may make sense as part of pipeline options is to let the user provide key value pairs of configuration options and merge those into the configuration object. |
bf8b452 to
c506d73
Compare
|
Run Python Flink ValidatesRunner |
|
Run Flink ValidatesRunner |
| ExecutionEnvironment executionEnvironment = | ||
| FlinkExecutionEnvironments.createBatchExecutionEnvironment(pipelineOptions, filesToStage); | ||
| FlinkExecutionEnvironments.createBatchExecutionEnvironment( | ||
| pipelineOptions, filesToStage, confDir); |
There was a problem hiding this comment.
Is the config also passed for the streaming translator?
|
I think this needs to be adapted to also use the config in streaming translation. Otherwise it looks fine! |
c506d73 to
26ca49e
Compare
|
Thanks @mxm . |
| StreamExecutionEnvironment sev = | ||
| FlinkExecutionEnvironments.createStreamExecutionEnvironment( | ||
| options, Collections.emptyList(), flinkConfDir); | ||
| options, Collections.emptyList(), confDir); |
|
Is this change now equivalent to setting |
|
@tweise It overrides the |
| @Option( | ||
| name = "--flink-conf-dir", | ||
| usage = | ||
| "Directory containing Flink YAML configuration files. These properties will be set to all jobs submitted to Flink." |
There was a problem hiding this comment.
Mention here that it overrides FLINK_CONF_DIR and also confirm that if this option isn't used FLINK_CONF_DIR remains in effect.
…ng config in exectution environment
26ca49e to
f84feac
Compare
This is needed as when submitting to remote execution environment, client config from the request is used.
Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.It will help us expedite review of your Pull Request if you tag someone (e.g.
@username) to look at it.Post-Commit Tests Status (on master branch)