From notifications-return-752-archive-asf-public=cust-asf.ponee.io@nemo.apache.org Mon Aug 5 07:58:28 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 45350180679 for ; Mon, 5 Aug 2019 09:58:28 +0200 (CEST) Received: (qmail 26885 invoked by uid 500); 5 Aug 2019 07:58:27 -0000 Mailing-List: contact notifications-help@nemo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nemo.apache.org Delivered-To: mailing list notifications@nemo.apache.org Received: (qmail 26830 invoked by uid 99); 5 Aug 2019 07:58:27 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Aug 2019 07:58:27 +0000 From: GitBox To: notifications@nemo.apache.org Subject: [GitHub] [incubator-nemo] johnyangk commented on a change in pull request #223: [NEMO-388] Off-heap memory management (reuse ByteBuffer) Message-ID: <156499190757.12470.6574236194116836874.gitbox@gitbox.apache.org> Date: Mon, 05 Aug 2019 07:58:27 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit johnyangk commented on a change in pull request #223: [NEMO-388] Off-heap memory management (reuse ByteBuffer) URL: https://github.com/apache/incubator-nemo/pull/223#discussion_r310457085 ########## File path: runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/BlockManagerWorker.java ########## @@ -357,6 +358,12 @@ public void run() { for (final SerializedPartition partition : partitions) { try (ByteOutputContext.ByteOutputStream os = outputContext.newOutputStream()) { os.writeSerializedPartitionBuffer(partition); Review comment: Would it make sense to additionally pass a boolean here? releaseAfterDone? (There may be a better name) Then, in ByteOutputContext#writeSerializedPartitionBuffer, we can instantiate a ChannelFutureListener that releases the partition depending on the given boolean. We pass the listener down to writeByteBuf, writeBuffer, and writeDataFrame. (Preferably, this listener does not check for `future#isXX()` and `partitionToRelease != null`) I think this lets us release the partition exactly when we want to. (i.e., always release when boolean=true, and the boolean is set **before** writing to the network). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services