You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/25 17:44:00 UTC
[jira] [Work logged] (HDDS-2273) Avoid buffer copying in
GrpcReplicationService
[ https://issues.apache.org/jira/browse/HDDS-2273?focusedWorklogId=334248&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-334248 ]
ASF GitHub Bot logged work on HDDS-2273:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Oct/19 17:43
Start Date: 25/Oct/19 17:43
Worklog Time Spent: 10m
Work Description: adoroszlai commented on pull request #87: HDDS-2273. Avoid buffer copying in GrpcReplicationService
URL: https://github.com/apache/hadoop-ozone/pull/87
## What changes were proposed in this pull request?
Use `ByteString.Output` stream instead of `ByteArrayOutputStream`. Its initial size is configured to 1MB (same as previous buffer size), and is flushed when that size is reached. This helps to avoid allocating multiple buffers as well as buffer copy when converting to `ByteString`.
https://issues.apache.org/jira/browse/HDDS-2273
## How was this patch tested?
Tested closed container replication manually with a 300MB container. Verified that container is correctly replicated to other datanode. Also verified that flush happens when buffer is full.
```
datanode_1 | - Streaming container data (1) to other datanode
datanode_1 | - Sending 1048576 bytes (of type LiteralByteString) for container 1
datanode_1 | - Sending 530637 bytes (of type LiteralByteString) for container 1
datanode_1 | - 1579213 bytes written to the rpc stream from container 1
...
datanode_5 | - Container is downloaded to /tmp/container-copy/container-1.tar.gz
datanode_5 | - Container 1 is downloaded, starting to import.
datanode_5 | - Container 1 is replicated successfully
datanode_5 | - Container 1 is replicated.
```
----------------------------------------------------------------
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
Issue Time Tracking
-------------------
Worklog Id: (was: 334248)
Remaining Estimate: 0h
Time Spent: 10m
> Avoid buffer copying in GrpcReplicationService
> ----------------------------------------------
>
> Key: HDDS-2273
> URL: https://issues.apache.org/jira/browse/HDDS-2273
> Project: Hadoop Distributed Data Store
> Issue Type: Improvement
> Reporter: Tsz-wo Sze
> Assignee: Attila Doroszlai
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In GrpcOutputStream, it writes data to a ByteArrayOutputStream and copies them to a ByteString.
--
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