Hello dear Flink community, I am new to Flink and am working on implementing my first job. While doing so, I wanted to implement the `org.apache.flink.api.connector.sink2.Sink` interface to collect items into a thread-safe list (for testing purposes).
To implement this interface, it is required to implement the following method: ```java public SinkWriter<T> createWriter(InitContext initContext) throws IOException ``` This method uses the `org.apache.flink.api.connector.sink2.Sink.InitContext` class, which is flagged as deprecated. >From what I understand, the org.apache.flink.api.connector.sink2 package seems to be the go-to package for Flink 1.20, as indicated in the deprecated list [1]. Most, if not all, classes from the `org.apache.flink.api.connector.sink` package are deprecated. This leads to some confusion: why is the InitContext from sink2 deprecated, yet still used by other parts of the library in the latest stable version (1.20)? Did I miss something in the documentation, or is there an issue with the release? What can be done to avoid using deprecated code entirely in Flink? Please also note that the documentation for Flink 1.20 [2] is using the deprecated FunctionSink class which is confusing when trying to learn Flink. Thank you very much for your help. Best regards, Adrien [1] https://nightlies.apache.org/flink/flink-docs-release-1.20/api/java/deprecated-list.html [2] https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/dev/datastream/testing/