You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "GuoHao (Jira)" <ji...@apache.org> on 2022/03/16 12:37:00 UTC

[jira] [Comment Edited] (HDDS-6137) Optimized the putBlock method of BlockDataStreamOutput

    [ https://issues.apache.org/jira/browse/HDDS-6137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17506795#comment-17506795 ] 

GuoHao edited comment on HDDS-6137 at 3/16/22, 12:36 PM:
---------------------------------------------------------

pr: https://github.com/apache/ozone/pull/3195


was (Author: nicholas niu):
pr: https://issues.apache.org/jira/browse/HDDS-6137

> Optimized the putBlock method of BlockDataStreamOutput
> ------------------------------------------------------
>
>                 Key: HDDS-6137
>                 URL: https://issues.apache.org/jira/browse/HDDS-6137
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: GuoHao
>            Assignee: GuoHao
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: 3195_review.patch
>
>
> Optimized the putBlock method of BlockDataStreamOutput
>  
> *1. PutBlock does not use RaftRpc, but through the stream close() method*
> {code:java}
> // putBlock metadata
> ByteBuffer buf =
>     ContainerCommandRequestMessage.toMessage(putBlockRequestProto, null)
>         .getContent().asReadOnlyByteBuffer();
> out.writeAsync(buf, StandardWriteOption.CLOSE); {code}
> *2.Mark the stream data boundary by sending an empty stream packet*
> {code:java}
> // Mark the stream data boundary
> out.writeAsync(ByteBuffer.allocateDirect(0).asReadOnlyBuffer()); {code}
>  
> *3. Flush is also in the form of async RPC, because putBlock needs to fetch bcsId (Raft log index)*
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org