[ 
https://issues.apache.org/jira/browse/HDDS-6400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kaijie Chen updated HDDS-6400:
------------------------------
    Description: 
Refactor ECKeyOutputStream to make the code cleaner.

Reuse code when writing the last stripe or rewriting failed stripes.

The changes includes:
 # handleDataWrite() has been changed to handleWrite(),
it will check strip full and call encodeAndWriteParityCells().
 # checkAndWriteParityCells() has been changed to encodeAndWriteParityCells(),
and it can be reused to encode partial stripe in close().
 # handleParityWrites() has seperated generateParityCells(),
it can be reused in rewriteStripeToNewBlockGroup().
 # handleFailedStreams() has been changed to excludePipelineAndFailedDN(),
it will exclude both failed pipeline and failed datanodes.
 # Reuse handleOutputStreamWrite() in close()
 # generateParityCells() will duplicate dataBuffers to prevent changing them,
so we don't have to track stripe length in rewrite.
 # Moved isLastBlock check inside handleParityWrites(),
so that we don't need to pass isClose parameter around in rewrite.

  was:
Refactor ECKeyOutputStream to make the code cleaner.

Reuse code when writing the last stripe or rewriting failed stripes.

The changes includes:
 # handleDataWrite() has been changed to handleWrite(),
it will check strip full and call encodeAndWriteParityCells().
 # checkAndWriteParityCells() has been changed to encodeAndWriteParityCells(),
and it can be reused to encode partial stripe in close().
 # handleParityWrites() has seperated generateParityCells(),
it can be reused in rewriteStripeToNewBlockGroup().
 # handleFailedStreams() has been changed to excludePipelineAndFailedDN(),
it will exclude both failed pipeline and failed datanodes.
 # Reuse handleOutputStreamWrite() in close()


> EC: Refactor ECKeyOutputStream for better code reuse
> ----------------------------------------------------
>
>                 Key: HDDS-6400
>                 URL: https://issues.apache.org/jira/browse/HDDS-6400
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Kaijie Chen
>            Assignee: Kaijie Chen
>            Priority: Major
>              Labels: pull-request-available
>
> Refactor ECKeyOutputStream to make the code cleaner.
> Reuse code when writing the last stripe or rewriting failed stripes.
> The changes includes:
>  # handleDataWrite() has been changed to handleWrite(),
> it will check strip full and call encodeAndWriteParityCells().
>  # checkAndWriteParityCells() has been changed to encodeAndWriteParityCells(),
> and it can be reused to encode partial stripe in close().
>  # handleParityWrites() has seperated generateParityCells(),
> it can be reused in rewriteStripeToNewBlockGroup().
>  # handleFailedStreams() has been changed to excludePipelineAndFailedDN(),
> it will exclude both failed pipeline and failed datanodes.
>  # Reuse handleOutputStreamWrite() in close()
>  # generateParityCells() will duplicate dataBuffers to prevent changing them,
> so we don't have to track stripe length in rewrite.
>  # Moved isLastBlock check inside handleParityWrites(),
> so that we don't need to pass isClose parameter around in rewrite.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to