Class ErasureEncodingStep

java.lang.Object
org.apache.hadoop.io.erasurecode.coder.ErasureEncodingStep
All Implemented Interfaces:
ErasureCodingStep

@Private public class ErasureEncodingStep extends Object implements ErasureCodingStep
Erasure encoding step, a wrapper of all the necessary information to perform an encoding step involved in the whole process of encoding a block group.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ErasureEncodingStep(ECBlock[] inputBlocks, ECBlock[] outputBlocks, RawErasureEncoder rawEncoder)
    The constructor with all the necessary info.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notify erasure coder that all the chunks of input blocks are processed so the coder can be able to update internal states, considering next step.
    Input blocks of readable data involved in this step, may be data blocks or parity blocks.
    Output blocks of writable buffers involved in this step, may be data blocks or parity blocks.
    void
    performCoding(ECChunk[] inputChunks, ECChunk[] outputChunks)
    Perform encoding or decoding given the input chunks, and generated results will be written to the output chunks.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ErasureEncodingStep

      public ErasureEncodingStep(ECBlock[] inputBlocks, ECBlock[] outputBlocks, RawErasureEncoder rawEncoder)
      The constructor with all the necessary info.
      Parameters:
      inputBlocks - inputBlocks.
      outputBlocks - outputBlocks.
      rawEncoder - rawEncoder.
  • Method Details

    • performCoding

      public void performCoding(ECChunk[] inputChunks, ECChunk[] outputChunks) throws IOException
      Description copied from interface: ErasureCodingStep
      Perform encoding or decoding given the input chunks, and generated results will be written to the output chunks.
      Specified by:
      performCoding in interface ErasureCodingStep
      Parameters:
      inputChunks - inputChunks.
      outputChunks - outputChunks.
      Throws:
      IOException - raised on errors performing I/O.
    • getInputBlocks

      public ECBlock[] getInputBlocks()
      Description copied from interface: ErasureCodingStep
      Input blocks of readable data involved in this step, may be data blocks or parity blocks.
      Specified by:
      getInputBlocks in interface ErasureCodingStep
      Returns:
      input blocks
    • getOutputBlocks

      public ECBlock[] getOutputBlocks()
      Description copied from interface: ErasureCodingStep
      Output blocks of writable buffers involved in this step, may be data blocks or parity blocks.
      Specified by:
      getOutputBlocks in interface ErasureCodingStep
      Returns:
      output blocks
    • finish

      public void finish()
      Description copied from interface: ErasureCodingStep
      Notify erasure coder that all the chunks of input blocks are processed so the coder can be able to update internal states, considering next step.
      Specified by:
      finish in interface ErasureCodingStep