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

mingchao zhao commented on HDDS-6137:
-------------------------------------

Yes,  In the original [design 
document|https://issues.apache.org/jira/secure/attachment/13015193/Ozone%20Write%20Streaming.pdf
 ](you can see Approach 2), we were wanted PutBlock to eventually use streaming 
as well. 

> 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
>
> Optimized the putBlock method of BlockDataStreamOutput
>  # PutBlock does not use RaftRpc, but through the stream close() method
>  # 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}
> {code:java}
> // putBlock metadata
> ByteBuffer buf =
>     ContainerCommandRequestMessage.toMessage(putBlockRequestProto, null)
>         .getContent().asReadOnlyByteBuffer();
> out.writeAsync(buf, StandardWriteOption.CLOSE); {code}
>  
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to