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]Added the function of generating labels when Flink Sink is completed … #2469

Closed
wants to merge 5 commits into from

Conversation

siyangzeng
Copy link

Purpose

We need to enhance paimon's capabilities in flink batch processing scenarios, such as generating tags after flink batch processing is completed. This function has a very good practical effect when combined with changelog internally.

Tests

API and Format

Documentation

@siyangzeng siyangzeng changed the title 【flink】Added the function of generating labels when Flink Sink is completed … [flink]Added the function of generating labels when Flink Sink is completed … Dec 8, 2023
@@ -301,6 +301,13 @@ public class FlinkConnectorOptions {
.withDescription(
"Sink committer memory to control heap memory of global committer.");

public static final ConfigOption<Boolean> SINK_FINISH_GENERATAR_TAG =
ConfigOptions.key("sink.finish.generatar-tag")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this feature be a part of tag.automatic-creation? We can introduce BATCH TagCreationMode.
The downside of this is that it cannot be orthogonal to the automatic creation of tags in streaming writing.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, we hope to use tags in batch processing scenarios and generate corresponding tags after the current task ends.

Do you mean to add a batch mode in tag.automatic-creation without adding new configuration? If that's the case, I think it's okay

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, tag.automatic-creation=batch

Copy link
Author

Choose a reason for hiding this comment

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

Please take another look

* Commit {@link Committable} for snapshot using the {@link CommitterOperator}.
* When the task is completed, the corresponding tag is generated.
*/
public class SinkFinishGeneratorTagOperator<CommitT, GlobalCommitT> implements
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 create a ITCase for this feature?

Copy link
Author

Choose a reason for hiding this comment

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

Okay, I'll provide it later

* Commit {@link Committable} for snapshot using the {@link CommitterOperator}.
* When the task is completed, the corresponding tag is generated.
*/
public class SinkFinishGeneratorTagOperator<CommitT, GlobalCommitT> implements
Copy link
Contributor

Choose a reason for hiding this comment

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

Also ut case.

SetupableStreamOperator,
BoundedOneInput {

private static final String SINK_FINISH_TAG_PREFIX = "sinkFinish-";
Copy link
Contributor

Choose a reason for hiding this comment

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

Only concern is here, better name?
Maybe batch-write-2023-12-13?

Copy link
Author

Choose a reason for hiding this comment

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

yes, updated

@JingsongLi
Copy link
Contributor

Compile failed?

@JingsongLi
Copy link
Contributor

+1 and merged

siyangzeng pushed a commit to siyangzeng/incubator-paimon that referenced this pull request Jan 4, 2024
JingsongLi pushed a commit that referenced this pull request Jan 15, 2024
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