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_r251491763
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java
##########
@@ -146,11 +141,7 @@ public void broadcastEmit(T record) throws IOException,
InterruptedException {
* This is used to send LatencyMarks to a random target channel.
*/
public void randomEmit(T record) throws IOException,
InterruptedException {
- checkErroneous();
- serializer.serializeRecord(record);
- if
(copyFromSerializerToTargetChannel(rng.nextInt(numberOfChannels))) {
- serializer.prune();
- }
+ emit(record, rng.nextInt(numberOfChannels));
}
private void emit(T record, int[] targetChannels) throws IOException,
InterruptedException {
Review comment:
nit: maybe inline this method if it's only used in `broadcastEmit`?
----------------------------------------------------------------
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]
With regards,
Apache Git Services