Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-35378] [FLIP-453] Promote Unified Sink API V2 to Public and Deprecate SinkFunction #24805

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MartijnVisser
Copy link
Contributor

What is the purpose of the change

Promote Unified Sink API V2 to Public and Deprecate SinkFunction

Brief change log

da30c2f Deprecate SinkFunction, SocketClientSink and TwoPhaseCommitSinkFunction
aa94e38 Promote SinkV2 interfaces
b9c692d Use new V2 DiscardingSink
2a11eeb Use new PrintSink
50b7df7 Promote PrintSink from @PublicEvolving to @Public

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): yes
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

…mmitSinkFunction

As part of FLIP-453, these interfaces are annotated with `@Deprecated` and point to their successors.

* org.apache.flink.streaming.api.functions.sink#SinkFunction
* org.apache.flink.streaming.api.functions.sink#SocketClientSink
* org.apache.flink.streaming.api.functions.sink#TwoPhaseCommitSinkFunction
As part of FLIP-453, the following interfaces are annotated with `@Public`
* org.apache.flink.api.connector.sink2#Committer
* org.apache.flink.api.connector.sink2#CommitterInitContext
* org.apache.flink.api.connector.sink2#CommittingSinkWriter
* org.apache.flink.api.connector.sink2#Sink
* org.apache.flink.api.connector.sink2#SinkWriter
* org.apache.flink.api.connector.sink2#StatefulSinkWriter
* org.apache.flink.api.connector.sink2#SupportsCommitter
* org.apache.flink.api.connector.sink2#SupportsWriterState
* org.apache.flink.api.connector.sink2#WriterInitContext
This commit replaces all usage of the old DiscardingSink (that was based on the SinkFunction), with the new V2 DiscardingSink (that is based on the SinkV2 APIs)

It also deprecates the old DiscardingSink by annotating it as `@Deprecated`
This commit replaces all usage of the old PrintSinkFunction (that was based on the SinkFunction), with the new PrintSink (that is based on the SinkV2 APIs)

It also deprecates the PrintSinkFunction by annotating it as `@Deprecated`
The PrintSink has been there since Flink 1.16.0 and should have been promoted earlier already.
@MartijnVisser MartijnVisser changed the title [FLINK-35378] FLIP-453: Promote Unified Sink API V2 to Public and Deprecate SinkFunction [FLINK-35378] [FLIP-453] Promote Unified Sink API V2 to Public and Deprecate SinkFunction May 16, 2024
@flinkbot
Copy link
Collaborator

flinkbot commented May 16, 2024

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants