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 2019/05/30 03:07:09 UTC

[GitHub] [flink] zhijiangW commented on a change in pull request #8559: [FLINK-12576][Network, Metrics]Take localInputChannel into account when complute inputQueueLength

zhijiangW commented on a change in pull request #8559: [FLINK-12576][Network, Metrics]Take localInputChannel into account when complute inputQueueLength
URL: https://github.com/apache/flink/pull/8559#discussion_r288842591
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -273,6 +273,8 @@ public int getNumberOfQueuedBuffers() {
 				for (InputChannel channel : inputChannels.values()) {
 					if (channel instanceof RemoteInputChannel) {
 						totalBuffers += ((RemoteInputChannel) channel).getNumberOfQueuedBuffers();
+					} else if (channel instanceof LocalInputChannel) {
 
 Review comment:
   Maybe we could implement `getNumberOfQueuedBuffers` in parent `InputChannel` and returns default 0. For `RemoteInputChannel` and `LocalInputChannel` could override this method for returning real values. `UnknownInputChannel` do nothing. Then we could avoid `instanceof` here.

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