From hdfs-issues-return-285452-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Sep 27 06:14:09 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 3C4DD180638 for ; Fri, 27 Sep 2019 08:14:09 +0200 (CEST) Received: (qmail 70896 invoked by uid 500); 27 Sep 2019 06:14:08 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 70884 invoked by uid 99); 27 Sep 2019 06:14:08 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2019 06:14:08 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E182EE313D for ; Fri, 27 Sep 2019 06:14:02 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 62437780778 for ; Fri, 27 Sep 2019 06:14:00 +0000 (UTC) Date: Fri, 27 Sep 2019 06:14:00 +0000 (UTC) From: "Hadoop QA (Jira)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDDS-2169) Avoid buffer copies while submitting client requests in Ratis MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDDS-2169?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16939= 160#comment-16939160 ]=20 Hadoop QA commented on HDDS-2169: --------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s= {color} | {color:blue} Docker mode activated. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 11s{co= lor} | {color:red} https://github.com/apache/hadoop/pull/1517 does not appl= y to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hado= op/HowToContribute for help. {color} | \\ \\ || Subsystem || Report/Notes || | GITHUB PR | https://github.com/apache/hadoop/pull/1517 | | JIRA Issue | HDDS-2169 | | Console output | https://builds.apache.org/job/hadoop-multibranch/job/PR-= 1517/3/console | | versions | git=3D2.17.1 | | Powered by | Apache Yetus 0.10.0 http://yetus.apache.org | This message was automatically generated. > Avoid buffer copies while submitting client requests in Ratis > ------------------------------------------------------------- > > Key: HDDS-2169 > URL: https://issues.apache.org/jira/browse/HDDS-2169 > Project: Hadoop Distributed Data Store > Issue Type: Improvement > Reporter: Shashikant Banerjee > Assignee: Tsz-wo Sze > Priority: Major > Labels: pull-request-available > Attachments: o2169_20190923.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > Currently, while sending write requests to Ratis from ozone, a protobuf o= bject containing data encoded=C2=A0 and then resultant protobuf is again co= nverted to a byteString which internally does a copy of the buffer embedded= inside the protobuf again so that it can be submitted over to Ratis client= . Again, while sending the appendRequest as well while building up the appe= ndRequestProto, it might be again copying the data. The idea here is to pro= vide client so pass the raw data(stateMachine data) separately to ratis cli= ent without copying overhead.=C2=A0 > =C2=A0 > {code:java} > private CompletableFuture sendRequestAsync( > ContainerCommandRequestProto request) { > try (Scope scope =3D GlobalTracer.get() > .buildSpan("XceiverClientRatis." + request.getCmdType().name()) > .startActive(true)) { > ContainerCommandRequestProto finalPayload =3D > ContainerCommandRequestProto.newBuilder(request) > .setTraceID(TracingUtil.exportCurrentSpan()) > .build(); > boolean isReadOnlyRequest =3D HddsUtils.isReadOnly(finalPayload); > // finalPayload already has the byteString data embedded.=20 > ByteString byteString =3D finalPayload.toByteString(); -----> It invo= lves a copy again. > if (LOG.isDebugEnabled()) { > LOG.debug("sendCommandAsync {} {}", isReadOnlyRequest, > sanitizeForDebug(finalPayload)); > } > return isReadOnlyRequest ? > getClient().sendReadOnlyAsync(() -> byteString) : > getClient().sendAsync(() -> byteString); > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org