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:
[email protected]
With regards,
Apache Git Services