[ https://issues.apache.org/jira/browse/FLINK-10662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16689674#comment-16689674 ]
Piotr Nowojski commented on FLINK-10662: ---------------------------------------- I think both current solution and iterator are more complicated to handle/implement. Iterator is probably better then {{int[]}}. As far as I know and talked with [~StephanEwen] there are no plans to select only some of the channels, so that's why I was in favour of dropping it. Performance benefits were not huge, but visible ~10% in synthetic network benchmarks if I remember correctly. Always something. Normally this {{int[] selectChannels()}} simplification would be nice to have, but not must have for me. However since broadcasting will need to be handled in a special way to avoid data copying, it would leave out {{int[] selectChannels()}} interface to ONLY handle single integers. {{Either<Integer, PredefinedPattern>}} could be less efficient and {{PredefinedPattern.BROADCASTING}} would also not be used/called after implementing broadcast optimisations. > Refactor the ChannelSelector interface for single selected channel > ------------------------------------------------------------------ > > Key: FLINK-10662 > URL: https://issues.apache.org/jira/browse/FLINK-10662 > Project: Flink > Issue Type: Sub-task > Components: Network > Affects Versions: 1.5.4, 1.6.1 > Reporter: zhijiang > Assignee: zhijiang > Priority: Minor > > In the discussion of broadcast improvement, [~pnowojski] pointed out the > issue of improving the current channel selector. > > In {{ChannelSelector#selectChannels}}, it would return an array for selected > channels. But considering specific implementations, only > {{BroadcastPartitioner}} would select all the channels, and other > implementations will select one channel. So we can simple this interface to > return single channel index for benefiting performance, and specialize the > {{BroadcastPartitioner}} in a more efficient way. -- This message was sent by Atlassian JIRA (v7.6.3#76005)