[
https://issues.apache.org/jira/browse/FLINK-10662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688257#comment-16688257
]
Nico Kruber commented on FLINK-10662:
-------------------------------------
If we never call {{BroadcastPartitioner#selectChannels()}}, I'd actually prefer
the {{UnsupportedOperationException}} over an artificial return value.
-> How would you actually make sure that
{{BroadcastPartitioner#selectChannels()}} is not called?
An alternative could be to use {{org.apache.flink.types.Either<Integer,
PredefinedPattern>}} which goes into the direction of (2).
The question in general would be: how much performance do we gain from this
change? And: can we rule out any other use than the proposed "either one
channel or all of them"? If there is use for that, how about using
(4) an iterator interface?
> 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)