rkhachatryan commented on a change in pull request #15200:
URL: https://github.com/apache/flink/pull/15200#discussion_r648105112
##########
File path:
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogMapState.java
##########
@@ -51,16 +63,28 @@ public UV get(UK key) throws Exception {
@Override
public void put(UK key, UV value) throws Exception {
+ if (getValueSerializer() instanceof MapSerializer) {
+ changeLogger.valueElementChanged(
+ out -> {
+ serializeKey(key, out);
+ serializeValue(value, out);
+ },
+ getCurrentNamespace());
+ } else {
+ changeLogger.valueAdded(singletonMap(key, value),
getCurrentNamespace());
Review comment:
I'm not sure (as `MapStateDescriptor` is not the only possible
`StateDescriptor`); but it simplifies the code :) I'll remove the additional
logic, thanks
--
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]