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-31950][table-planner] Introduce StateMetadata and StateMetadataJson SerDe #22492

Closed
wants to merge 4 commits into from

Conversation

LadyForest
Copy link
Contributor

@LadyForest LadyForest commented Apr 27, 2023

What is the purpose of the change

This is the first subtask of FLINK-31791 for FLIP-292.

Brief change log

This PR introduces StateMetadata, which describes the operator's state info, alongside withStateMetadataJsonSerializer and StateMetadataJsonDeserializer.

Verifying this change

This change added tests and can be verified as follows:

  • Add StateMetadataTest to verify the JsonSerde works as expected.

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, 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? FLINK-31957

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 27, 2023

CI report:

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

@LadyForest
Copy link
Contributor Author

@flinkbot run azure

@LadyForest LadyForest force-pushed the FLINK-31950 branch 2 times, most recently from 826bf4c to 5889eeb Compare April 29, 2023 08:10
@LadyForest LadyForest marked this pull request as ready for review May 10, 2023 14:06
@LadyForest
Copy link
Contributor Author

Since it's a huge change, let's separate this PR into several smaller PRs to ease the review.

@LadyForest LadyForest changed the title [FLINK-31950][table-planner] Introduce StateMetadata and support operator-level state TTL configuration via Compiled Plan [FLINK-31950][table-planner] Introduce StateMetadata and StateMetadataJson SerDe May 11, 2023
Copy link
Contributor

@godfreyhe godfreyhe left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, I left some comments

@LadyForest LadyForest requested a review from godfreyhe May 14, 2023 11:59
Copy link
Contributor

@godfreyhe godfreyhe left a comment

Choose a reason for hiding this comment

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

LGTM

Preconditions.checkNotNull(stateName, "state name should not be null"));
}

public StateMetadata(int stateIndex, @Nonnull Duration stateTtl, @Nonnull String stateName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: @Nonnull will check null value when running, you can improve it in the following prs

@godfreyhe godfreyhe closed this in 62b11e2 May 15, 2023
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.

3 participants