From notifications-return-599-archive-asf-public=cust-asf.ponee.io@nemo.apache.org Wed Jun 19 07:22:58 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 DAE5A1807CC for ; Wed, 19 Jun 2019 09:22:56 +0200 (CEST) Received: (qmail 98306 invoked by uid 500); 19 Jun 2019 07:22:56 -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 98173 invoked by uid 99); 19 Jun 2019 07:22:56 -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; Wed, 19 Jun 2019 07:22:56 +0000 From: GitBox To: notifications@nemo.apache.org Subject: [GitHub] [incubator-nemo] johnyangk commented on a change in pull request #222: [NEMO-350] Implement Off-heap SerializedMemoryStore & [NEMO-384] Implement DirectByteBufferInputStream for Off-heap SerializedMemoryStore Message-ID: <156092897607.3899.5250532722777106851.gitbox@gitbox.apache.org> Date: Wed, 19 Jun 2019 07:22:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit johnyangk commented on a change in pull request #222: [NEMO-350] Implement Off-heap SerializedMemoryStore & [NEMO-384] Implement DirectByteBufferInputStream for Off-heap SerializedMemoryStore URL: https://github.com/apache/incubator-nemo/pull/222#discussion_r295144377 ########## File path: runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/DataUtil.java ########## @@ -112,19 +114,19 @@ private static void serializePartition(final EncoderFactory encoderFactory, final List> serializedPartitions = new ArrayList<>(); for (final NonSerializedPartition partitionToConvert : partitionsToConvert) { try ( - DirectByteArrayOutputStream bytesOutputStream = new DirectByteArrayOutputStream(); - OutputStream wrappedStream = buildOutputStream(bytesOutputStream, serializer.getEncodeStreamChainers()); + DirectByteBufferOutputStream bytesOutputStream = new DirectByteBufferOutputStream(); + OutputStream wrappedStream = buildOutputStream(bytesOutputStream, serializer.getEncodeStreamChainers()) ) { serializePartition(serializer.getEncoderFactory(), partitionToConvert, wrappedStream); // We need to close wrappedStream on here, because DirectByteArrayOutputStream:getBufDirectly() returns // inner buffer directly, which can be an unfinished(not flushed) buffer. wrappedStream.close(); // Note that serializedBytes include invalid bytes. // So we have to use it with the actualLength by using size() whenever needed. - final byte[] serializedBytes = bytesOutputStream.getBufDirectly(); + final List serializedBufList = bytesOutputStream.getBufferList(); Review comment: directByteBufferList? ---------------------------------------------------------------- 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