Hi everyone, if I am not mistaken of the sinks mentioned by Joao Kafka, Kinesis & Kinesis already use the Sink2 API. How were those implemented without exposing the ExecutionConfig?
Best, Konstantin Am Mi., 1. Feb. 2023 um 12:28 Uhr schrieb Lijie Wang < wangdachui9...@gmail.com>: > +1 for Option 2, if we can abstract an "ReadableExecutionConfig" > interface(contains all is/get mehtod), and let ExecutionConfig implements > ReadableExecutionConfig > > Best, > Lijie > > João Boto <eskabe...@apache.org> 于2023年1月17日周二 20:39写道: > > > Hi all, > > > > As establish a read-only contract seems to be consensual approach, > talking > > to Lijie we saw two ways for doing this.. > > > > Option 1: UnmodifiableExecutionConfig that extends ExecutionConfig (just > > like the UnmodifiableConfiguration) > > Pros: > > - we have all the get methods > > - don't need to change TypeInformation.createSerializer(ExecutionConfig > > config) > > Cons: > > - we have to override 34 methods that modify things.. > > - new methods to ExecutionConfig will need to be override on > > UnmodifiableExecutionConfig > > > > > > Option 2: UnmodifiableExecutionConfig without extending ExecutionConfig. > > Pros: > > - new class so we don't need to override nothing. > > - modifications to ExecutionConfig don't affect this class > > Cons: > > - need to change TypeInformation adding > > createSerializer(UnmodifiableExecutionConfig config) > > - need to add all get methods or only what needed (this could be a pros) > > > > > > What option you think is better? > > > > > > > > On 2023/01/13 14:15:04 Joao Boto wrote: > > > Hi flink devs, > > > > > > I'd like to start a discussion thread for FLIP-287[1]. > > > This comes from an offline discussion with @Lijie Wang, from > FLIP-239[2] > > > specially for the sink[3]. > > > > > > Basically to expose the ExecutionConfig and JobId on > SinkV2#InitContext. > > > This changes are necessary to correct migrate the current sinks to > > SinkV2 > > > like JdbcSink, KafkaTableSink and so on, that relies on RuntimeContext > > > > > > Comments are welcome! > > > Thanks, > > > > > > [1] > > > > > > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=240880853 > > > [2] > > > > > > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=217386271 > > > [3] https://issues.apache.org/jira/browse/FLINK-25421 > > > > > > -- https://twitter.com/snntrable https://github.com/knaufk