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
> 

Reply via email to