[
https://issues.apache.org/jira/browse/HDDS-6137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze updated HDDS-6137:
-----------------------------
Summary: Refactor KeyDataStreamOutput. (was: Optimized the putBlock method
of BlockDataStreamOutput)
> Refactor KeyDataStreamOutput.
> -----------------------------
>
> 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_TestStreamDataChannel.patch,
> 3195_buffer_copying.patch, 3195_bugfix.patch, 3195_bugfix2.patch,
> 3195_review.patch, 3195_synchronized.patch, 3195_testBuffers.patch,
> ozone-root-datanode-9-29-173-57.log,
> ozone-root-datanode-9-29-173-57.log2.log,
> ozone-root-datanode-9-29-173-57.log3.log, ozone-root-datanode-9-29-173-57.log4
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]