[ 
https://issues.apache.org/jira/browse/HDDS-2270?focusedWorklogId=338720&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-338720
 ]

ASF GitHub Bot logged work on HDDS-2270:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Nov/19 13:43
            Start Date: 05/Nov/19 13:43
    Worklog Time Spent: 10m 
      Work Description: adoroszlai commented on pull request #118: HDDS-2270. 
Avoid buffer copying in ContainerStateMachine
URL: https://github.com/apache/hadoop-ozone/pull/118
 
 
   ## What changes were proposed in this pull request?
   
   Eliminate temporary `byte[]` buffer in `ContainerStateMachine` 
(`loadSnapshot` and `persistContainerSet`).
   
   https://issues.apache.org/jira/browse/HDDS-2270
   
   ## How was this patch tested?
   
   Verified on a docker-compose cluster that datanode writes/reads the snapshot 
info successfully.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 338720)
    Remaining Estimate: 0h
            Time Spent: 10m

> Avoid buffer copying in ContainerStateMachine.loadSnapshot/persistContainerSet
> ------------------------------------------------------------------------------
>
>                 Key: HDDS-2270
>                 URL: https://issues.apache.org/jira/browse/HDDS-2270
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: Ozone Datanode
>            Reporter: Tsz-wo Sze
>            Assignee: Attila Doroszlai
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> ContainerStateMachine:
> - In loadSnapshot(..), it first reads the snapshotFile to a  byte[] and then 
> parses it to ContainerProtos.Container2BCSIDMapProto.  The buffer copying can 
> be avoided.
> {code}
>     try (FileInputStream fin = new FileInputStream(snapshotFile)) {
>       byte[] container2BCSIDData = IOUtils.toByteArray(fin);
>       ContainerProtos.Container2BCSIDMapProto proto =
>           ContainerProtos.Container2BCSIDMapProto
>               .parseFrom(container2BCSIDData);
>       ...
>     }
> {code}
> - persistContainerSet(..) has similar problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to