pvary commented on PR #23876:
URL: https://github.com/apache/flink/pull/23876#issuecomment-1846629590
> @pvary Thanks for the patch. I am wondering if you have compared this
approach with the alternative I mentioned in the mailing list.
[..]
> The alternative approach has less changes to the existing interface. The
only caveat is we have to keep the legacy name of `InitContext`. However, given
that we are going to replace `StatefulSink` and `TwoPhaseCommttingSink` with
mixin interfaces, the naming issue is just temporary. We can use the new name
for InitContexts in the new mixin interfaces.
>
> From this standpoint, personally I prefer the alternative approach as it
introduces less changes to the existing interfaces that we are about to
deprecate. What do you think?
The typical implementation of the new mixin `Sink` will look like this:
```
public class MyLittleSink implements Sink, WithWriterState, WithCommitter {
public SinkWriter createWriter(WriterInitContext context) {..}
public Committer createCommitter(CommitterInitContext context) {..}
}
```
That is why, I think it is better to have different names for different
classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]