SinkV2 was introduced in Flink-1.15 and annotated as @PublicEvolving from the 
1st day [1]. From FLIP-197, we can promote it to @Public since it already 
existed with two releases.
And I didn't find a FLIP to discuss the process to deprecate APIs, considering 
the SinkFunction has actually been stale for some time, I think we can 
deprecate it with the @Public SinkV2.

Thus, +1 (binding) for this proposal.

[1] https://issues.apache.org/jira/browse/FLINK-25555

Best
Yun Tang

________________________________
From: Martijn Visser <martijnvis...@apache.org>
Sent: Wednesday, January 18, 2023 18:50
To: dev <dev@flink.apache.org>; Jing Ge <j...@ververica.com>; Yun Tang 
<myas...@live.com>
Subject: [DISCUSS] Promote SinkV2 to @Public and deprecate SinkFunction

Hi all,

While discussing FLIP-281 [1] the discussion also turned to the SinkFunction 
and the SinkV2 API. For a broader discussion I'm opening up a separate 
discussion thread.

As Yun Tang has mentioned in that discussion thread, it would be a good time to 
deprecate the SinkFunction to avoid the need to introduce new functions towards 
(to be) deprecated APIs. Jing rightfully mentioned that it would be confusing 
to deprecate the SinkFunction if its successor is not yet marked as @Public 
(it's currently @PublicEvolving).

My proposal would be to promote the SinkV2 API to @public in Flink 1.17 and 
mark the SinkFunction as @deprecated in Flink 1.17

The original Sink interface was introduced in Flink 1.12 with FLIP-143 [2] and 
extended with FLIP-177 in Flink 1.14 [3] and has been improved on further as 
Sink V2 via FLIP-191 in Flink 1.15 [4].

Looking at the API stability graduation process [5], the fact that Sink V2 was 
introduced in Flink 1.15 would mean that we could warrant a promotion to 
@public already (given that there have been two releases with 1.15 and 1.16 
where it was introduced). Combined with the fact that SinkV2 has been the 
result of iteration over the introduction of the original Sink API since Flink 
1.12, I would argue that the promotion is overdue.

If we promote the Sink API to @public, I think we should also immediately mark 
the SinkFunction as @deprecated.

Looking forward to your thoughts.

Best regards,

Martijn


[1] https://lists.apache.org/thread/l05m6cf8fwkkbpnjtzbg9l2lo40oxzd1
[2] 
https://cwiki.apache.org/confluence/display/FLINK/FLIP-143%3A+Unified+Sink+API
[3] 
https://cwiki.apache.org/confluence/display/FLINK/FLIP-177%3A+Extend+Sink+API
[4] 
https://cwiki.apache.org/confluence/display/FLINK/FLIP-191%3A+Extend+unified+Sink+interface+to+support+small+file+compaction
[5] 
https://cwiki.apache.org/confluence/display/FLINK/FLIP-197%3A+API+stability+graduation+process

Reply via email to