tzulitai commented on a change in pull request #8122: [FLINK-12121] [State
Backends] Use composition instead of inheritance for the InternalKeyContext
logic in backend
URL: https://github.com/apache/flink/pull/8122#discussion_r273794431
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/NestedMapsStateTable.java
##########
@@ -350,11 +353,13 @@ public int sizeOfNamespace(Object namespace) {
private final StateSnapshotTransformer<S> snapshotFilter;
NestedMapsStateTableSnapshot(
- NestedMapsStateTable<K, N, S> owningTable,
StateSnapshotTransformFactory<S> snapshotTransformFactory) {
+ NestedMapsStateTable<K, N, S> owningTable,
+ StateSnapshotTransformFactory<S>
snapshotTransformFactory,
+ TypeSerializer<K> keySerializer) {
super(owningTable);
this.snapshotFilter =
snapshotTransformFactory.createForDeserializedState().orElse(null);
- this.keySerializer =
owningStateTable.keyContext.getCurrentKeySerializer();
+ this.keySerializer = keySerializer;
Review comment:
can't we just do `this.keySerializer = owningStateTable.keySerializer`, and
avoid passing in the key serializer when instantiating
`NestedMapsStateTableSnapshot`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services