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/06/26 13:25:07 UTC

[GitHub] [flink] zhijiangW commented on a change in pull request #8648: [FLINK-12738][network] Remove abstract getPageSize method from InputGate

zhijiangW commented on a change in pull request #8648: [FLINK-12738][network] Remove abstract getPageSize method from InputGate
URL: https://github.com/apache/flink/pull/8648#discussion_r297662855
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/InputProcessorUtil.java
 ##########
 @@ -53,16 +54,17 @@ public static CheckpointBarrierHandler createCheckpointBarrierHandler(
 					+ " must be positive or -1 (infinite)");
 			}
 
+			int pageSize = ConfigurationParserUtils.getPageSize(taskManagerConfig);
 			if (taskManagerConfig.getBoolean(NettyShuffleEnvironmentOptions.NETWORK_CREDIT_MODEL)) {
 				barrierHandler = new BarrierBuffer(
 					inputGate,
-					new CachedBufferBlocker(inputGate.getPageSize()),
+					new CachedBufferBlocker(pageSize),
 
 Review comment:
   Yes, it might bring this concern here. 
   My initial version was removing this page size parameter from constructor of `CachedBufferBlocker`. The cached size could be got directly from `BufferOrEvent#getSize`. But it might bring previous behavior because the real size in buffer might be less than the configured page size. But it seems more reasonable to get cached size from data itself.

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