Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A47BF200D3F for ; Sun, 5 Nov 2017 00:45:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A2F6E160BFD; Sat, 4 Nov 2017 23:45:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E8627160BE9 for ; Sun, 5 Nov 2017 00:45:03 +0100 (CET) Received: (qmail 92037 invoked by uid 500); 4 Nov 2017 23:45:03 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 92028 invoked by uid 99); 4 Nov 2017 23:45:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Nov 2017 23:45:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 42C77180772 for ; Sat, 4 Nov 2017 23:45:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id v4RDjLeNjsZg for ; Sat, 4 Nov 2017 23:45:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1A0FC60E35 for ; Sat, 4 Nov 2017 23:45:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4D33AE095C for ; Sat, 4 Nov 2017 23:45:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0B0FE23F05 for ; Sat, 4 Nov 2017 23:45:00 +0000 (UTC) Date: Sat, 4 Nov 2017 23:45:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-7746) move ResultPartitionWriter#writeBufferToAllChannels up into ResultPartition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 04 Nov 2017 23:45:04 -0000 [ 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. + * + *

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)