wsry commented on a change in pull request #18130:
URL: https://github.com/apache/flink/pull/18130#discussion_r790539941



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
##########
@@ -1073,7 +1085,32 @@ private boolean queueChannelUnsafe(InputChannel channel, 
boolean priority) {
 
     // ------------------------------------------------------------------------
 
-    public Map<IntermediateResultPartitionID, InputChannel> getInputChannels() 
{
+    public Map<SubpartitionInfo, InputChannel> getInputChannels() {
         return inputChannels;
     }
+
+    static class SubpartitionInfo {
+        private final IntermediateResultPartitionID partitionID;
+        private final int subpartitionIndex;
+
+        SubpartitionInfo(IntermediateResultPartitionID partitionID, int 
subpartitionIndex) {
+            this.partitionID = partitionID;
+            this.subpartitionIndex = subpartitionIndex;
+        }
+
+        @Override
+        public int hashCode() {
+            return partitionID.hashCode() ^ subpartitionIndex;
+        }
+
+        @Override
+        public boolean equals(Object obj) {

Review comment:
       nit: maybe return true directly if this == obj.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to