Configurable, ErasureCoderDummyErasureEncoder, HHXORErasureEncoder, RSErasureEncoder, XORErasureEncoder@Private public abstract class ErasureEncoder extends Configured implements ErasureCoder
ErasureCoder interface.| Constructor | Description |
|---|---|
ErasureEncoder(ErasureCoderOptions options) |
| Modifier and Type | Method | Description |
|---|---|---|
ErasureCodingStep |
calculateCoding(ECBlockGroup blockGroup) |
Calculate the encoding or decoding steps given a block blockGroup.
|
protected ECBlock[] |
getInputBlocks(ECBlockGroup blockGroup) |
|
int |
getNumDataUnits() |
The number of data input units for the coding.
|
int |
getNumParityUnits() |
The number of parity output units for the coding.
|
ErasureCoderOptions |
getOptions() |
The options of erasure coder.
|
protected ECBlock[] |
getOutputBlocks(ECBlockGroup blockGroup) |
|
boolean |
preferDirectBuffer() |
Tell if direct or off-heap buffer is preferred or not.
|
protected abstract ErasureCodingStep |
prepareEncodingStep(ECBlockGroup blockGroup) |
Perform encoding against a block group.
|
void |
release() |
Release the resources if any.
|
getConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConf, setConfpublic ErasureEncoder(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)
protected ECBlock[] getOutputBlocks(ECBlockGroup blockGroup)
public boolean preferDirectBuffer()
ErasureCoderpreferDirectBuffer in interface ErasureCoderpublic void release()
ErasureCoderrelease in interface ErasureCoderprotected abstract ErasureCodingStep prepareEncodingStep(ECBlockGroup blockGroup)
blockGroup - blockGroup.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.