-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
@flinkbot run azure |
826bf4c
to
5889eeb
Compare
Since it's a huge change, let's separate this PR into several smaller PRs to ease the review. |
...able-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/StateMetadata.java
Outdated
Show resolved
Hide resolved
...able-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/StateMetadata.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
...ble-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/ExecNodeConfig.java
Outdated
Show resolved
Hide resolved
...able-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/StateMetadata.java
Show resolved
Hide resolved
...n/java/org/apache/flink/table/planner/plan/nodes/exec/serde/StateMetadataJsonSerializer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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
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
andStateMetadataJsonDeserializer
.Verifying this change
This change added tests and can be verified as follows:
StateMetadataTest
to verify the JsonSerde works as expected.Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation