You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Mason Chen <ma...@gmail.com> on 2021/09/04 01:49:39 UTC

Obtaining Flink Conf in User Code

Hi all,

Is it possible to obtain the Flink configuration in the user code? I've
tried the Configuration parameter in the open method of rich functions and
StreamExecutionEnvironment.getConfig().getGlobalJobParameters()--both do
not give the configs in the flink configuration.

Best,
Mason

Re: Obtaining Flink Conf in User Code

Posted by Arvid Heise <ar...@apache.org>.
I think there is no easy way to access the configuration. There is
GlobalConfiguration but it's marked Internal and I think it's even
discouraged inside core Flink.

However, usually you have full access to the Configuraiton inside your main
and you can simply pass it or the desired option to your UDF during setup.
Does that work for you?

On Sat, Sep 4, 2021 at 3:50 AM Mason Chen <ma...@gmail.com> wrote:

> Hi all,
>
> Is it possible to obtain the Flink configuration in the user code? I've
> tried the Configuration parameter in the open method of rich functions and
> StreamExecutionEnvironment.getConfig().getGlobalJobParameters()--both do
> not give the configs in the flink configuration.
>
> Best,
> Mason
>