Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
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 remove padding from dataBuffers after encoding,
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.
Attachments
Issue Links
- is duplicated by
-
HDDS-6475 EC: [Refactor-2] Check and write parity cells inside handleDataWrite
- Resolved
- links to