How to set global config in the rich functions

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

How to set global config in the rich functions

zhen li
Hi:
    I want to set some configs in the source functions use getRuntimeContext().getExecutionConfig().setGlobalJobParameters(parameterTool)
    And  used the configs in the downstream operators such as filter function through the getGlobalJobParameters, But it returns null pointer exception.Is the global config  only can set in the start of streams?

Reply | Threaded
Open this post in threaded view
|

Re: How to set global config in the rich functions

Hequn Cheng
Hi zhen,

Global configs can not be passed like this. You can set the global configs through ExecutionConfig, more details here[1]. 


On Wed, Jul 4, 2018 at 8:27 PM, zhen li <[hidden email]> wrote:
Hi:
    I want to set some configs in the source functions use getRuntimeContext().getExecutionConfig().setGlobalJobParameters(parameterTool)
    And  used the configs in the downstream operators such as filter function through the getGlobalJobParameters, But it returns null pointer exception.Is the global config  only can set in the start of streams?