-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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-37162] Add sinks.md to describe Flink's Data Sink API. #26013
base: master
Are you sure you want to change the base?
Conversation
|
||
The `SinkWriter` API only has three methods: | ||
- write(InputT element, Context context): Adds an element to the writer. | ||
- flush(boolean endOfInput): Called on checkpoint or end of input so that the writer to flush all pending data for at-least-once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: better English might be
Called on checkpoint or end of the input, setting this flag causes the writer to flush all pending data for at-least-once.
I am unsure about this comment, and what the writer is supposed to so with the flag set or on set. I assume the writer needs to check for at-least-once. For exactly-once - how does flush work?
|
||
### SupportsCommitter | ||
|
||
The {{< gh_link file="flink-core/src/main/java/org/apache/flink/api/connector/sink2/SupportsCommitter.java" name="SupportsCommitter" >}} interface is used to indicate that the sink supports exactly-once semantics using a two-phase commit protocol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be useful to point to how Flink is implementing 2 phase commit in the flink docs. Maybe this is another PR
What is the purpose of the change
Add doc for Sink API.
Brief change log
Add doc for Sink API and remove legacy doc about SourceFunction.
Verifying this change
Don't need.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation