Apache Flink - How to pass configuration params in the flink-config.yaml file to local execution environment

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

Apache Flink - How to pass configuration params in the flink-config.yaml file to local execution environment

M Singh
Hey Flink Folks:

I was trying to find out how can pass the params in the flink-config.yaml file to a application running in local env.

Can I create a flink-config.yaml file and include it in the class path ? Or can I pass the parameters via the parameter tool ?

Please let me know if there is any documentation on this.

Thanks.



Reply | Threaded
Open this post in threaded view
|

Re: Apache Flink - How to pass configuration params in the flink-config.yaml file to local execution environment

Dawid Wysakowicz-2

Hi,

You should be able to pass the Configuration via:

org.apache.flink.streaming.api.environment.StreamExecutionEnvironment#createLocalEnvironment(int, org.apache.flink.configuration.Configuration)

Regards,

Dawid

On 19/05/2019 20:49, M Singh wrote:
Hey Flink Folks:

I was trying to find out how can pass the params in the flink-config.yaml file to a application running in local env.

Can I create a flink-config.yaml file and include it in the class path ? Or can I pass the parameters via the parameter tool ?

Please let me know if there is any documentation on this.

Thanks.




signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Apache Flink - How to pass configuration params in the flink-config.yaml file to local execution environment

M Singh
In reply to this post by M Singh
Hey Folks:  Just wanted to see if you have any advice on this issue of passing config parameters to the application.  I've tried passing parameters by using


ParameterTool parameterTool = ParameterTool.fromMap(config);
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.getConfig().setGlobalJobParameters(parameterTool);

But the parameters in the parameter argument are not picked up by the application.

Thanks again for your help.

Mans

On Sunday, May 19, 2019, 02:50:03 PM EDT, M Singh <[hidden email]> wrote:


Hey Flink Folks:

I was trying to find out how can pass the params in the flink-config.yaml file to a application running in local env.

Can I create a flink-config.yaml file and include it in the class path ? Or can I pass the parameters via the parameter tool ?

Please let me know if there is any documentation on this.

Thanks.