[
https://issues.apache.org/jira/browse/FLINK-10662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718866#comment-16718866
]
ASF GitHub Bot commented on FLINK-10662:
----------------------------------------
pnowojski 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_r240980989
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/ChannelSelector.java
##########
@@ -37,12 +37,12 @@
void setup(int numberOfChannels);
/**
- * Returns the logical channel indexes, to which the given record
should be
+ * Returns the logical channel index, to which the given record should
be
* written.
*
* @param record the record to determine the output channels for.
- * @return an array of integer numbers which indicate the indices of
the output
- * channels through which the record shall be forwarded.
+ * @return an integer number which indicates the index of the output
+ * channel through which the record shall be forwarded.
*/
- int[] selectChannels(T record);
+ int selectChannels(T record);
Review comment:
rename to `selectChannel`?
----------------------------------------------------------------
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:
[email protected]
> 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
> Labels: pull-request-available
>
> 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)