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] Avoid deprecated SetupableStreamOperator #4591

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 fixes deprecated usage on Flink's SetupableStreamOperator, and replaces the function with StreamOperatorFactory.

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.

@@ -54,7 +53,6 @@ public abstract class PrepareCommitOperator<IN, OUT> extends AbstractStreamOpera

public PrepareCommitOperator(Options options) {
this.options = options;
setChainingStrategy(ChainingStrategy.ALWAYS);
Copy link
Contributor

Choose a reason for hiding this comment

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

The chainingStrategy in AbstractStreamOperator is HEAD by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AbstractStreamOperator#getChainingStrategy is used in SimpleOperatorFactory when the operator is subclass of SetupableStreamOperator. When PrepareCommitOperator does not inherit from SetupableStreamOperator, SimpleOperatorFactory will use ChainingStrategy.DEFAULT_CHAINING_STRATEGY = ALWAYS.

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 add tests for this? To check chainable.

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