flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7746) move ResultPartitionWriter#writeBufferToAllChannels up into ResultPartition
Date Sat, 04 Nov 2017 23:45:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-7746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239324#comment-16239324
] 

ASF GitHub Bot commented on FLINK-7746:
---------------------------------------

Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4759#discussion_r148944363
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
---
    @@ -293,6 +293,27 @@ public void add(Buffer buffer, int subpartitionIndex) throws IOException
{
     	}
     
     	/**
    +	 * Writes the given buffer to all available target channels.
    +	 *
    +	 * <p>The buffer is taken over and used for each of the channels. It will be recycled
afterwards.
    +	 *
    +	 * @param buffer the buffer to write
    +	 */
    +	public void addToAllChannels(Buffer buffer) throws IOException {
    +		try {
    +			for (int targetChannel = 0; targetChannel < subpartitions.length; targetChannel++)
{
    +				// retain the buffer so that it can be recycled by each channel of targetPartition
    +				buffer.retain();
    --- End diff --
    
    ok, why not...


> move ResultPartitionWriter#writeBufferToAllChannels up into ResultPartition
> ---------------------------------------------------------------------------
>
>                 Key: FLINK-7746
>                 URL: https://issues.apache.org/jira/browse/FLINK-7746
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Network
>    Affects Versions: 1.4.0
>            Reporter: Nico Kruber
>            Assignee: Nico Kruber
>
> As a step towards removing the (unneeded) {{ResultPartitionWriter}} wrapper, we should
move {{ResultPartitionWriter#writeBufferToAllChannels}} into {{ResultPartition}} where single-channel
writing happens anyway.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message