[ 
https://issues.apache.org/jira/browse/FLINK-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339696#comment-16339696
 ] 

ASF GitHub Bot commented on FLINK-8345:
---------------------------------------

Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5230#discussion_r163935632
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/OperatorBackendStateMetaInfoSnapshotReaderWriters.java
 ---
    @@ -211,4 +297,34 @@ public 
OperatorBackendStateMetaInfoReaderV2(ClassLoader userCodeClassLoader) {
                        return stateMetaInfo;
                }
        }
    +
    +   public static class BroadcastStateMetaInfoReaderV2<K, V> extends 
AbstractBroadcastStateMetaInfoReader<K, V> {
    +
    +           public BroadcastStateMetaInfoReaderV2(final ClassLoader 
userCodeClassLoader) {
    +                   super(userCodeClassLoader);
    +           }
    +
    +           @Override
    +           public RegisteredBroadcastBackendStateMetaInfo.Snapshot<K, V> 
readBroadcastStateMetaInfo(final DataInputView in) throws IOException {
    +                   RegisteredBroadcastBackendStateMetaInfo.Snapshot<K, V> 
stateMetaInfo =
    +                                   new 
RegisteredBroadcastBackendStateMetaInfo.Snapshot<>();
    +
    +                   stateMetaInfo.setName(in.readUTF());
    +                   
stateMetaInfo.setAssignmentMode(OperatorStateHandle.Mode.values()[in.readByte()]);
    +
    +                   Tuple2<TypeSerializer<?>, TypeSerializerConfigSnapshot> 
keySerializerAndConfig =
    +                                   
TypeSerializerSerializationUtil.readSerializersAndConfigsWithResilience(in, 
userCodeClassLoader).get(0);
    --- End diff --
    
    If the `writeSerializersAndConfigsWithResilience` call was a single one in 
the writer, then here you can also just get all written serializers and configs 
with a single `readSerializersAndConfigsWithResilience`.
    The returned list would be length 2 (order of the key / value serializer + 
config will be the same as how you wrote them).


> Iterate over keyed state on broadcast side of connect with broadcast.
> ---------------------------------------------------------------------
>
>                 Key: FLINK-8345
>                 URL: https://issues.apache.org/jira/browse/FLINK-8345
>             Project: Flink
>          Issue Type: New Feature
>          Components: Streaming
>    Affects Versions: 1.5.0
>            Reporter: Kostas Kloudas
>            Assignee: Kostas Kloudas
>            Priority: Major
>             Fix For: 1.5.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to