Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/4552#discussion_r162103769
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/PartitionRequestClientFactory.java
---
@@ -164,11 +165,13 @@ private boolean dispose() {
private void handInChannel(Channel channel) {
synchronized (connectLock) {
try {
- PartitionRequestClientHandler
requestHandler = channel.pipeline()
-
.get(PartitionRequestClientHandler.class);
+ NetworkClientHandler clientHandler =
channel.pipeline().get(PartitionRequestClientHandler.class);
+ if (clientHandler == null) {
+ clientHandler =
channel.pipeline().get(CreditBasedPartitionRequestClientHandler.class);
+ }
--- End diff --
if you let `NetworkClientHandler` extend from `ChannelHandler`, then this
can be simplified to
```
NetworkClientHandler clientHandler =
channel.pipeline().get(NetworkClientHandler.class);
```
---