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] Replace legacy SourceFunction with v2 Source #4614

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yunfengzhou-hub
Copy link
Contributor

Purpose

Linked issue: #4442

This PR replaces legacy SourceFunction with FLIP-27 Source.

Tests

Existing test cases are used to verify this change.

API and Format

This change does not affect API or storage format.

Documentation

This change does not affect introduce a new feature.


public MonitorSource(
ReadBuilder readBuilder, long monitorInterval, boolean emitSnapshotWatermark) {
this.readBuilder = readBuilder;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you extract implementation in common, let all flink 1.x share codes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In future paimon-flink-common will rely on flink 2.0, which will not provide SourceFunction as public API. Where can we place the common MonitorSource in this case?

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean, you can extract a class implementation without SourceFunction, just for reusing codes.

* <ol>
* <li>Consumer-id: rely on this function to do aligned snapshot consumption, and ensure that all
* data in a snapshot is consumed within each checkpoint.
* <li>Snapshot-watermark: when there is no watermark definition, the default Paimon table will
Copy link
Contributor

@JingsongLi JingsongLi Dec 2, 2024

Choose a reason for hiding this comment

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

Can you add comment? Why Flink 2.0 can support this in Source API?

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.

2 participants