zhijiangW commented on a change in pull request #7199: [FLINK-10662][network] Refactor the ChannelSelector interface for single selected channel URL: https://github.com/apache/flink/pull/7199#discussion_r251352161
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java ########## @@ -68,20 +68,29 @@ private final boolean flushAlways; + private final boolean isBroadcastSelector; + private Counter numBytesOut = new SimpleCounter(); private Counter numBuffersOut = new SimpleCounter(); public RecordWriter(ResultPartitionWriter writer) { - this(writer, new RoundRobinChannelSelector<T>()); + this(writer, new RoundRobinChannelSelector<T>(), false); } - @SuppressWarnings("unchecked") - public RecordWriter(ResultPartitionWriter writer, ChannelSelector<T> channelSelector) { - this(writer, channelSelector, false); + public RecordWriter( Review comment: Yes, from the long time we might do not need the `BroadcastPartitioner` implementation because we do not need any specific methods from this partitioner, then it can avoid the current `UnsupportedOperationException` ugly way. But it might refactor the implementation from DataStream path related to generate `BroadcastPartitioner`, and I would take the simple `ChannelSelector#isBroadcast` currently. :) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services