Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0
    • None

    Description

      Refactor ECKeyOutputStream to make the code cleaner.

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

      The changes includes:

      1. handleDataWrite() has been changed to handleWrite(),
        it will check strip full and call encodeAndWriteParityCells().
      2. checkAndWriteParityCells() has been changed to encodeAndWriteParityCells(),
        and it can be reused to encode partial stripe in close().
      3. handleParityWrites() has seperated generateParityCells(),
        it can be reused in rewriteStripeToNewBlockGroup().
      4. handleFailedStreams() has been changed to excludePipelineAndFailedDN(),
        it will exclude both failed pipeline and failed datanodes.
      5. Reuse handleOutputStreamWrite() in close().
      6. generateParityCells() will remove padding from dataBuffers after encoding,
        so we don't have to track stripe length in rewrite.
      7. Moved isLastBlock check inside handleParityWrites(),
        so that we don't need to pass isClose parameter around in rewrite.

      Attachments

        Issue Links

          Activity

            People

              ckj Kaijie Chen
              ckj Kaijie Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: