Class ErasureEncodingStep
java.lang.Object
org.apache.hadoop.io.erasurecode.coder.ErasureEncodingStep
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionErasureEncodingStep(ECBlock[] inputBlocks, ECBlock[] outputBlocks, RawErasureEncoder rawEncoder) The constructor with all the necessary info. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()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.ECBlock[]Input blocks of readable data involved in this step, may be data blocks or parity blocks.ECBlock[]Output blocks of writable buffers involved in this step, may be data blocks or parity blocks.voidperformCoding(ECChunk[] inputChunks, ECChunk[] outputChunks) Perform encoding or decoding given the input chunks, and generated results will be written to the output chunks.
-
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
Description copied from interface:ErasureCodingStepPerform encoding or decoding given the input chunks, and generated results will be written to the output chunks.- Specified by:
performCodingin interfaceErasureCodingStep- Parameters:
inputChunks- inputChunks.outputChunks- outputChunks.- Throws:
IOException- raised on errors performing I/O.
-
getInputBlocks
Description copied from interface:ErasureCodingStepInput blocks of readable data involved in this step, may be data blocks or parity blocks.- Specified by:
getInputBlocksin interfaceErasureCodingStep- Returns:
- input blocks
-
getOutputBlocks
Description copied from interface:ErasureCodingStepOutput blocks of writable buffers involved in this step, may be data blocks or parity blocks.- Specified by:
getOutputBlocksin interfaceErasureCodingStep- Returns:
- output blocks
-
finish
public void finish()Description copied from interface:ErasureCodingStepNotify 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:
finishin interfaceErasureCodingStep
-