zhijiangW commented on a change in pull request #11687:
URL: https://github.com/apache/flink/pull/11687#discussion_r419490643



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/BufferManager.java
##########
@@ -65,14 +65,10 @@
        @GuardedBy("bufferQueue")
        private int numRequiredBuffers;
 
-       public BufferManager(
-               MemorySegmentProvider globalPool,
-               InputChannel inputChannel,
-               int numRequiredBuffers) {
-
-               this.globalPool = checkNotNull(globalPool);
-               this.inputChannel = checkNotNull(inputChannel);
+       public BufferManager(InputChannel inputChannel, int numRequiredBuffers) 
{
                checkArgument(numRequiredBuffers >= 0);
+               this.inputChannel = checkNotNull(inputChannel);
+               this.globalPool = 
inputChannel.inputGate.getMemorySegmentProvider();

Review comment:
       Actually I injected it in the constructor in previous version, but since 
we can not get ride of `InputChannel` completed in `BufferManager` as above 
said, then I reduce this unnecessary argument in constructor.




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


Reply via email to