GitHub user zhijiangW opened a pull request: https://github.com/apache/flink/pull/4485
[FLINK-7378][core]Implement the FixedBufferPool for floating buffers of SingleInputGate ## What is the purpose of the change Currently the number of network buffers in `LocalBufferPool` for `SingleInputGate` is limited by `a * <number of channels> + b`, where a is the number of exclusive buffers for each channel and b is the number of floating buffers shared by all channels. Considering the credit-based flow control feature, we want to implement a new fixed size buffer pool type used to manage the floating buffers for `SingleInputGate`. Compared with `LocalBufferPool`, this is a non-rebalancing buffer pool which will not participate in redistributing the left available buffers in `NetworkBufferPool`. ## Brief change log - *Implemented a new fixed size buffer pool type* - *Added a `BufferPoolListener` interface for notifying buffer availability more than once, this can replace the current `EventListener` in `BufferProvider` interface later* - *Distinguished the fixed buffer pools and redistributed buffer pools in `NetworkBufferPool`* ## Verifying this change This change added tests and can be verified as follows: - *Added `FixedBufferPoolTest` for verifying this new buffer pool behaviors* - *Modified the existing `NetworkBufferPoolTest` and `BufferPoolFactoryTest` for verifying creating fixed buffer pool and redistribute the available buffers in `NetworkBufferPool`* ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) You can merge this pull request into a Git repository by running: $ git pull https://github.com/zhijiangW/flink FLINK-7378 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/4485.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4485 ---- commit 5c7a27f6fdd215150174c7827cc87b5ea08e01bc Author: Zhijiang <wangzhijiang...@aliyun.com> Date: 2017-08-07T09:31:17Z [FLINK-7378][core]Implement the FixedBufferPool for floating buffers of SingleInputGate ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---