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-6258] Deprecate ListCheckpointed interface #11618

Conversation

aljoscha
Copy link
Contributor

@aljoscha aljoscha commented Apr 2, 2020

This also updates the documentation and changes usage in our code to
CheckpointedFunction.

The Google PubSub source unfortunately also uses ListCheckpointed but
here we cannot migrate to CheckpointedFunction because of savepoint
compatibility.

Brief change log

  • add @deprecated annotation, pointing to CheckpointedFunction as the replacement
  • migrate documentation and examples and internal usage
  • there is one usage left in the GCP PubSub connector, we cannot change that because of savepoint compatibility

Verifying this change

  • this change some tests to use CheckpointedFunction instead of ListCheckpointed

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

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

Documentation

Documentation is updated to remove mentions of ListCheckpointed.

cc @knaufk @sjwiesman @alpinegizmo @NicoK (it's probably good for you to be aware of this). Could one of you maybe give me a review?

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 2, 2020

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 d0915b5 (Thu Apr 02 11:08:52 UTC 2020)

Warnings:

  • Documentation files were touched, but no .zh.md files: Update Chinese documentation or file Jira ticket.

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 Apr 2, 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

@aljoscha aljoscha force-pushed the flink-6258-deprecate-list-checkpointed branch 2 times, most recently from 0f46673 to 361c7e9 Compare April 2, 2020 12:48
@sjwiesman
Copy link
Contributor

sjwiesman commented Apr 2, 2020

@aljoscha this looks good to me. You could replace the usage in the pubsub connector my using the same state descriptor as ListCheckpointed. The only caveat is JavaSerializer is currently package-private so that would also need to be changed. Your choice if you want to address that or not.

new ListStateDescriptor<>("_default_", new JavaSerializer<>());

Also, can you please open a follow-up ticket to update the Chinese docs.

@@ -533,8 +533,8 @@ in that:

## Using Operator State

To use operator state, a stateful function can implement either the more general `CheckpointedFunction`
interface, or the `ListCheckpointed<T extends Serializable>` interface.
To use operator state, a stateful function can implement the `CheckpointedFunction`
Copy link
Contributor

@sjwiesman sjwiesman Apr 2, 2020

Choose a reason for hiding this comment

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

Just thinking out loud, not for this pr, but we are probably going to need to update the data stream docs to avoid the phrase "stateful function"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😂

@aljoscha
Copy link
Contributor Author

aljoscha commented Apr 2, 2020

Yes, I didn't want to go into extra shenanigans with JavaSerializer. I think that class also should not exist... 🙈

@aljoscha
Copy link
Contributor Author

aljoscha commented Apr 2, 2020

But otherwise you think it's good to merge? I would create a Jira issue for the chinese doc and point at the commit that does this change here.

@sjwiesman
Copy link
Contributor

👍 to merge

This also updates the documentation and changes usage in our code to
CheckpointedFunction.

The Google PubSub source unfortunately also uses ListCheckpointed but
here we cannot migrate to CheckpointedFunction because of savepoint
compatibility.
@aljoscha aljoscha force-pushed the flink-6258-deprecate-list-checkpointed branch from 361c7e9 to 2436722 Compare April 3, 2020 09:02
@aljoscha aljoscha closed this Apr 3, 2020
@aljoscha aljoscha deleted the flink-6258-deprecate-list-checkpointed branch April 3, 2020 15:13
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.

4 participants