Hi Rui, Thank you for your feedback. Regarding your question, I want to let you know that we have included the alternative getter method "@PublicEvolving Map<String, String> getGlobalJobParameters()" in this FLIP. And this method will provide users with global job parameters. I would appreciate it if you could share your thoughts on whether this addition adequately resolves your concerns.
Best, Junrui Rui Fan <1996fan...@gmail.com> 于2023年11月16日周四 13:15写道: > Thanks Junrui for driving this proposal! > > Overall looks good to me! I have a question: > How do the flink users to getGlobalJobParameters if > RuntimeContext#getExecutionConfig is removed? > Is there any alternative api? Or is this feature removed? > > Maybe this is a noob question and I may have missed > some information. > > Best, > Rui > > On Thu, Nov 16, 2023 at 11:05 AM Zhu Zhu <reed...@gmail.com> wrote: > >> Thanks Junrui for creating the FLIP and kicking off this discussion. >> >> Exposing a mutable ExecutionConfig which is even shared by multiple >> operators is truly a defect which can result in weird results. >> >> +1 >> >> Thanks, >> Zhu >> >> Junrui Lee <jrlee....@gmail.com> 于2023年11月15日周三 16:53写道: >> >>> Hi all, >>> >>> I'd like to start a discussion of FLIP-391: Deprecate >>> RuntimeContext#getExecutionConfig[1]. >>> >>> Currently, the FLINK RuntimeContext is important for connecting user >>> functions to the underlying runtime details. It provides users with >>> necessary runtime information during job execution. >>> However, he current implementation of the FLINK RuntimeContext exposes >>> the >>> ExecutionConfig to users, resulting in two issues: >>> Firstly, the ExecutionConfig contains much unrelated information that can >>> confuse users and complicate management. >>> Secondly, exposing the ExecutionConfig allows users to modify it during >>> job >>> execution, which can cause inconsistencies and problems, especially with >>> operator chaining. >>> >>> Therefore, we propose deprecating the RuntimeContext#getExecutionConfig >>> in >>> the FLINK RuntimeContext. In the upcoming FLINK-2.0 version, we plan to >>> completely remove the RuntimeContext#getExecutionConfig method. Instead, >>> we >>> will introduce alternative getter methods that enable users to access >>> specific information without exposing unnecessary runtime details. These >>> getter methods will include: >>> >>> 1. @PublicEvolving <T> TypeSerializer<T> >>> createSerializer(TypeInformation<T> typeInformation); >>> 2. @PublicEvolving Map<String, String> getGlobalJobParameters(); >>> 3. @PublicEvolving boolean isObjectReuseEnabled(); >>> >>> Looking forward to your feedback and suggestions, thanks. >>> >>> [1] >>> >>> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=278465937 >>> >>> Best regards, >>> Junrui >>> >>