Access Flink configuration in user functions

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

Access Flink configuration in user functions

Paul Lam
Hi to all,

I would like to use a custom RocksDBStateBackend which uses the default checkpoint dir in Flink configuration, but I failed to find a way to access Flink configuration in the user code. So I wonder is it possible to retrieve Flink configurations (not user-defined global parameters) at the user main method? Or the configuration is only used internally? Thanks!

Best,
Paul Lam

Reply | Threaded
Open this post in threaded view
|

Re: Access Flink configuration in user functions

Chesnay Schepler
The configuration is not accessible to user-functions or the main method.

The could either override ConfigurableStatebackend#configure, or configure the statebackend globally (see  https://ci.apache.org/projects/flink/flink-docs-release-1.7/ops/state/state_backends.html#setting-default-state-backend), the backend factory does get access to it I believe.

On 28.12.2018 05:56, Paul Lam wrote:
Hi to all,

I would like to use a custom RocksDBStateBackend which uses the default checkpoint dir in Flink configuration, but I failed to find a way to access Flink configuration in the user code. So I wonder is it possible to retrieve Flink configurations (not user-defined global parameters) at the user main method? Or the configuration is only used internally? Thanks!

Best,
Paul Lam