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-17376][API/DataStream]Deprecated methods and related code updated #12189

Closed
wants to merge 5 commits into from
Closed

Conversation

mghildiy
Copy link
Contributor

@mghildiy mghildiy commented May 16, 2020

What is the purpose of the change

Objective of this PR is to remove the following deprecated method and update related code:

  • RuntimeContext.getFoldingState(...)
  • OperatorStateStore.getSerializableListState(...)
  • OperatorStateStore.getOperatorState(...)

Brief change log

NA

Verifying this change

NA

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 256cc76 (Sat May 16 11:41:48 UTC 2020)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented May 16, 2020

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@@ -388,7 +389,7 @@ public void initializeState(FunctionInitializationContext context) throws Except
}

OperatorStateStore stateStore = context.getOperatorStateStore();
restoredBucketStates = stateStore.getSerializableListState("bucket-states");
this.restoredBucketStates = stateStore.getListState(new ListStateDescriptor("bucket-states", State.class));
Copy link
Contributor

Choose a reason for hiding this comment

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

This will not actually work because getListState(..., State.class) should be created a GenericTypeInfo, which is incompatible with the JavaSerializer used before internally here.

@aljoscha
Copy link
Contributor

@flinkbot run azure

@dawidwys
Copy link
Contributor

Hey @mghildiy do you still want to work on this issue? This issue actually blocks the 1.11 release. I see you haven't addressed @aljoscha's comment yet. It's fine, but if you don't have time, maybe somebody else could take over.

@mghildiy
Copy link
Contributor Author

Sorry for delay. I am stuck with some issues, and plan to work on it this weekend. If its needed urgently, I am fine with someone else taking it up.

Copy link
Member

@klion26 klion26 left a comment

Choose a reason for hiding this comment

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

@mghildiy thanks for the contribution. It seems there still some other FoldingState usages are not touched in current change.

@aljoscha aljoscha self-assigned this May 22, 2020
We do this because we want to deprecate that method. We will have to get
rid of using JavaSerialization completely soon, though.
@aljoscha
Copy link
Contributor

I rebased and fixed the problems, @klion26 would you take another look?

cc @mghildiy

@klion26
Copy link
Member

klion26 commented May 28, 2020

@aljoscha Will check it now

Copy link
Member

@klion26 klion26 left a comment

Choose a reason for hiding this comment

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

There are still some places contain folding state, such as TtlFoldingStateVerifier, TestSharedBuffer, KeyedStateStore, DefaultKeyedStateStore, WindowOperator, WindowOperatorContractTest.
and we need to update the doc state.md and state.zh.md

@aljoscha
Copy link
Contributor

@klion26 That's a good point. This PR/Jira issue is about removing the access methods, we can remove FoldingState and the internals in the state backend later.

Good point about updating the docs! I will do that

@aljoscha
Copy link
Contributor

@klion26 I pushed some more changes. Please take another look.

@klion26
Copy link
Member

klion26 commented May 29, 2020

@aljoscha thanks for the update. Remove FoldingState and the internals in the state backend later make senses to me. current PR LGTM % FoldingState in section Using Keyed State state.md & state.zh.md

diff for state.zh.md based on current pr
state.zh.md.diff.txt

@aljoscha
Copy link
Contributor

aljoscha commented Jun 2, 2020

pushed changes

Copy link
Member

@klion26 klion26 left a comment

Choose a reason for hiding this comment

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

@aljoscha thanks for the work. LGTM now

@aljoscha
Copy link
Contributor

aljoscha commented Jun 3, 2020

I've merged this on master and will also merge on release-1.11.

Thanks @mghildiy for the initial work, and thanks @klion26 for reviewing!

@aljoscha aljoscha closed this Jun 3, 2020
@fapaul
Copy link

fapaul commented Jun 17, 2020

It is probably worthwhile mentioning the transitive effect of these changes in the release notes.
For example, user jars that include the flink-connector-kafka dependency based on 1.10 will not work anymore due to the removal of OperatorStateStore.getSerializableListState.

@aljoscha
Copy link
Contributor

That's a very good point! I'm adding a release note.

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

Successfully merging this pull request may close these issues.

7 participants