Class RSErasureEncoder
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.io.erasurecode.coder.ErasureEncoder
org.apache.hadoop.io.erasurecode.coder.RSErasureEncoder
- All Implemented Interfaces:
Configurable,ErasureCoder
Reed-Solomon erasure encoder that encodes a block group.
It implements
ErasureCoder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTell if direct or off-heap buffer is preferred or not.protected ErasureCodingStepprepareEncodingStep(ECBlockGroup blockGroup) Perform encoding against a block group.voidrelease()Release the resources if any.Methods inherited from class org.apache.hadoop.io.erasurecode.coder.ErasureEncoder
calculateCoding, getInputBlocks, getNumDataUnits, getNumParityUnits, getOptions, getOutputBlocksMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Constructor Details
-
RSErasureEncoder
-
-
Method Details
-
prepareEncodingStep
Description copied from class:ErasureEncoderPerform encoding against a block group.- Specified by:
prepareEncodingStepin classErasureEncoder- Parameters:
blockGroup- blockGroup.- Returns:
- encoding step for caller to do the real work
-
release
public void release()Description copied from interface:ErasureCoderRelease the resources if any. Good chance to invoke RawErasureCoder#release.- Specified by:
releasein interfaceErasureCoder- Overrides:
releasein classErasureEncoder
-
preferDirectBuffer
public boolean preferDirectBuffer()Description copied from interface:ErasureCoderTell if direct or off-heap buffer is preferred or not. It's for callers to decide how to allocate coding chunk buffers, either on heap or off heap. It will return false by default.- Specified by:
preferDirectBufferin interfaceErasureCoder- Overrides:
preferDirectBufferin classErasureEncoder- Returns:
- true if direct buffer is preferred for performance consideration, otherwise false.
-