pvary commented on code in PR #23912:
URL: https://github.com/apache/flink/pull/23912#discussion_r1446081006
##########
flink-core/src/main/java/org/apache/flink/api/connector/sink2/Sink.java:
##########
@@ -52,11 +54,30 @@ public interface Sink<InputT> extends Serializable {
* @param context the runtime context.
* @return A sink writer.
* @throws IOException for any failure during creation.
+ * @deprecated Please implement {@link #createWriter(WriterInitContext)}.
For backward
+ * compatibility reasons - to keep {@link Sink} a functional interface
- Flink did not
+ * provide a default implementation. New {@link Sink} implementations
should implement this
+ * method, but it will not be used, and it will be removed in 1.20.0
release. Do not use
+ * {@link Override} annotation when implementing this method, to
prevent compilation errors
+ * when migrating to 1.20.x release.
*/
+ @Deprecated
Review Comment:
`since` is only supported since java9. The code should be compatible with
java8, so we can not use `since` yet.
##########
flink-core/src/main/java/org/apache/flink/api/connector/sink2/StatefulSink.java:
##########
@@ -36,49 +34,43 @@
* @param <WriterStateT> The type of the sink writer's state
*/
@PublicEvolving
-public interface StatefulSink<InputT, WriterStateT> extends Sink<InputT> {
+@Deprecated
Review Comment:
added in #24022 24022
--
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]