GitHub user zhijiangW opened a pull request: https://github.com/apache/flink/pull/4509
[FLINK-7406][network] Implement Netty receiver incoming pipeline for credit-based ## What is the purpose of the change Currently `PartitionRequestClientHandler` receives and reads BufferResponse from producer. It will request buffer from `BufferPool` for holding the message. If not got, the message is staged temporarily and autoread of channel is set false. For credit-based mode, `PartitionRequestClientHandler` can always get buffer from `RemoteInputChannel` for reading messages from producer, and update backlog of producer to trigger requests of floating buffers. This pull request depends on previous two [PRs](https://github.com/apache/flink/pull/4499) whose commits are also included for passing travis, so review the third commit for this pull request change. In order not to affect the current process and existing cases, we implement a temporary netty handler called `CreditBasedClientHanlder` which will replace the current `PartitionRequestClientHandler` after whole feature codes are submitted. ## Brief change log - *Add the backlog of producer in `BufferResponse` message structure* - *Netty handler requests buffer from `RemoteInputChannel` directly* - *Netty handler updates backlog for `RemoteInputChannel`, and it may trigger requests of floating buffers from `BufferPool`* ## Verifying this change This change added tests and can be verified as follows: - *Modified netty message serialization tests for new added backlog in `BufferResponse`* - *Some additional tests and cases would be supplied after the sender logic submitted* ## 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-7406 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/4509.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 #4509 ---- commit 5c7a27f6fdd215150174c7827cc87b5ea08e01bc Author: Zhijiang <wangzhijiang...@aliyun.com> Date: 2017-08-07T09:31:17Z [FLINK-7378][core]Implement the FixedBufferPool for floating buffers of SingleInputGate commit f5fb7baeeac3be3719555e37c39d07839d094799 Author: Zhijiang <wangzhijiang...@aliyun.com> Date: 2017-08-09T05:43:56Z [FLINK-7394][core]Implement basic InputChannel for credit-based logic commit d6e35a06e43cf6e7e8d548ebff34dd9877f749bb Author: Zhijiang <wangzhijiang...@aliyun.com> Date: 2017-08-10T05:29:13Z [FLINK-7406][network]Implement Netty receiver incoming pipeline for credit-based ---- --- 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. ---