You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/27 13:02:58 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #11218: [FLINK-16285][network] Refactor SingleInputGate#setInputChannel to remove IntermediateResultPartitionID argument

rkhachatryan commented on a change in pull request #11218: [FLINK-16285][network] Refactor SingleInputGate#setInputChannel to remove IntermediateResultPartitionID argument
URL: https://github.com/apache/flink/pull/11218#discussion_r385106353
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -322,9 +322,10 @@ public void assignExclusiveSegments() throws IOException {
 		}
 	}
 
-	public void setInputChannel(IntermediateResultPartitionID partitionId, InputChannel inputChannel) {
+	public void setInputChannel(InputChannel inputChannel) {
+		IntermediateResultPartitionID partitionId = checkNotNull(inputChannel).partitionId.getPartitionId();
 
 Review comment:
   :thumbsup: for removing potential inconsistency and extra argument
   Just two minor issues here:
   1. `checkNotNull` right before dereferencing doesn't make sense to me
   2. I think it's preferable to access `InputChannel.partitionId` through its getter

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


With regards,
Apache Git Services