Class ErasureDecodingStep
java.lang.Object
org.apache.hadoop.io.erasurecode.coder.ErasureDecodingStep
- All Implemented Interfaces:
ErasureCodingStep
Erasure decoding step, a wrapper of all the necessary information to perform
a decoding step involved in the whole process of decoding a block group.
-
Constructor Summary
ConstructorsConstructorDescriptionErasureDecodingStep(ECBlock[] inputBlocks, int[] erasedIndexes, ECBlock[] outputBlocks, RawErasureDecoder rawDecoder) 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
-
ErasureDecodingStep
public ErasureDecodingStep(ECBlock[] inputBlocks, int[] erasedIndexes, ECBlock[] outputBlocks, RawErasureDecoder rawDecoder) The constructor with all the necessary info.- Parameters:
inputBlocks- inputBlocks.erasedIndexes- the indexes of erased blocks in inputBlocks arrayoutputBlocks- outputBlocks.rawDecoder- rawDecoder.
-
-
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
-