zhijiangW commented on a change in pull request #7368: [FLINK-10742][network]
Let Netty use Flink's buffers directly in credit-based mode
URL: https://github.com/apache/flink/pull/7368#discussion_r385507440
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyProtocol.java
##########
@@ -120,10 +120,14 @@
* @return channel handlers
*/
public ChannelHandler[] getClientChannelHandlers() {
- return new ChannelHandler[] {
- messageEncoder,
- new NettyMessage.NettyMessageDecoder(),
- new CreditBasedPartitionRequestClientHandler()};
+ CreditBasedPartitionRequestClientHandler
networkClientHandler = new CreditBasedPartitionRequestClientHandler();
+ NettyMessageClientDecoderDelegate
nettyMessageClientDecoderDelegate
+ = new
NettyMessageClientDecoderDelegate(networkClientHandler);
+
+ return new ChannelHandler[] {
+ messageEncoder,
+ nettyMessageClientDecoderDelegate,
Review comment:
nit: `new NettyMessageClientDecoderDelegate(networkClientHandler)` instead,
avoid above too long definition.
----------------------------------------------------------------
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