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] Upgrade sink connector to new API version #205

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michaelkoepf
Copy link
Contributor

@michaelkoepf michaelkoepf commented Dec 17, 2024

Purpose

Linked issue: close #132

Upgrade sink connector from deprecated RichSinkFunction (will be removed in Flink 2.0) to new Sink interface

Tests

  • UT (adapted to new implementation, test case logic unchanged): com.alibaba.fluss.connector.flink.sink.FlinkSinkWriterTest.java
  • IT (unchanged, because external interface did not change): com.alibaba.fluss.connector.flink.sink.FlinkTableSinkITCase.java

API and Format

n/a

Documentation

n/a

- Upgraded sink connector from deprecated RichSinkFunction to new Sink interface
- Adapted corresponding unit test cases

Issue alibaba#132
@ChaomingZhangCN
Copy link
Contributor

LGTM, cc @wuchong.

@michaelkoepf michaelkoepf changed the title [flink] Upgraded sink connector to new API version [flink] Upgrade sink connector to new API version Dec 17, 2024
@@ -90,14 +84,13 @@ public FlinkSinkFunction(
this.tableRowType = tableRowType;
}

@Override
public void open(org.apache.flink.configuration.Configuration config) {
public void initialize(WriterInitContext context) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming this function initialize instead of open is intentional to avoid ambiguities with old Flink API

- Adapted access modifiers
- Consistent naming

Issue alibaba#132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Use new sink api for Flink connector
2 participants