Configurable, ErasureCoderDummyErasureDecoder, HHXORErasureDecoder, RSErasureDecoder, XORErasureDecoder@Private public abstract class ErasureDecoder extends Configured implements ErasureCoder
ErasureCoder interface.| Constructor | Description |
|---|---|
ErasureDecoder(ErasureCoderOptions options) |
| Modifier and Type | Method | Description |
|---|---|---|
ErasureCodingStep |
calculateCoding(ECBlockGroup blockGroup) |
Calculate the encoding or decoding steps given a block blockGroup.
|
protected int[] |
getErasedIndexes(ECBlock[] inputBlocks) |
Get indexes of erased blocks from inputBlocks
|
protected ECBlock[] |
getInputBlocks(ECBlockGroup blockGroup) |
We have all the data blocks and parity blocks as input blocks for
recovering by default.
|
int |
getNumDataUnits() |
The number of data input units for the coding.
|
protected static int |
getNumErasedBlocks(ECBlock[] inputBlocks) |
Find out how many blocks are erased.
|
protected int |
getNumErasedBlocks(ECBlockGroup blockGroup) |
Get the number of erased blocks in the block group.
|
int |
getNumParityUnits() |
The number of parity output units for the coding.
|
ErasureCoderOptions |
getOptions() |
The options of erasure coder.
|
protected ECBlock[] |
getOutputBlocks(ECBlockGroup blockGroup) |
Which blocks were erased ?
|
boolean |
preferDirectBuffer() |
Tell if direct or off-heap buffer is preferred or not.
|
protected abstract ErasureCodingStep |
prepareDecodingStep(ECBlockGroup blockGroup) |
Perform decoding against a block blockGroup.
|
void |
release() |
Release the resources if any.
|
getConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConf, setConfpublic ErasureDecoder(ErasureCoderOptions options)
public ErasureCodingStep calculateCoding(ECBlockGroup blockGroup)
ErasureCodercalculateCoding in interface ErasureCoderblockGroup - the erasure coding block group containing all necessary
information for codec calculationpublic int getNumDataUnits()
ErasureCodergetNumDataUnits in interface ErasureCoderpublic int getNumParityUnits()
ErasureCodergetNumParityUnits in interface ErasureCoderpublic ErasureCoderOptions getOptions()
ErasureCodergetOptions in interface ErasureCoderprotected ECBlock[] getInputBlocks(ECBlockGroup blockGroup)
blockGroup - blockGroup.protected ECBlock[] getOutputBlocks(ECBlockGroup blockGroup)
blockGroup - blockGroup.public boolean preferDirectBuffer()
ErasureCoderpreferDirectBuffer in interface ErasureCoderpublic void release()
ErasureCoderrelease in interface ErasureCoderprotected abstract ErasureCodingStep prepareDecodingStep(ECBlockGroup blockGroup)
blockGroup - blockGroup.protected int getNumErasedBlocks(ECBlockGroup blockGroup)
blockGroup - blockGroup.protected static int getNumErasedBlocks(ECBlock[] inputBlocks)
inputBlocks - all the input blocksprotected int[] getErasedIndexes(ECBlock[] inputBlocks)
inputBlocks - inputBlocks.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.