pnowojski commented on a change in pull request #14509:
URL: https://github.com/apache/flink/pull/14509#discussion_r549658160



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTaskNetworkInput.java
##########
@@ -73,21 +72,20 @@
 
     private final DeserializationDelegate<StreamElement> 
deserializationDelegate;
 
-    private final RecordDeserializer<DeserializationDelegate<StreamElement>>[] 
recordDeserializers;
+    private final Map<InputChannelInfo, 
RecordDeserializer<DeserializationDelegate<StreamElement>>>
+            recordDeserializers;
+    private final Map<InputChannelInfo, Integer> flattenedChannelIndices;

Review comment:
       The only reason why we need this, is because of `StatusWatermarkValve`? 
And theoretically we could migrate `StatusWatermarkValve` from raw indexes to 
`InputChannelInfo` and get rid of this conversion as well?
   
   If so, that brings another question. Could there be a similar bugs in 
`StatusWatermarkValve` that originate from using raw `int` as channel index?

##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTaskNetworkInput.java
##########
@@ -73,21 +72,20 @@
 
     private final DeserializationDelegate<StreamElement> 
deserializationDelegate;
 
-    private final RecordDeserializer<DeserializationDelegate<StreamElement>>[] 
recordDeserializers;
+    private final Map<InputChannelInfo, 
RecordDeserializer<DeserializationDelegate<StreamElement>>>

Review comment:
       We are accessing this `Map` just once per buffer, so there should be no 
performance penalty?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to