Class NativeRSRawDecoder
java.lang.Object
org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder
org.apache.hadoop.io.erasurecode.rawcoder.NativeRSRawDecoder
A Reed-Solomon raw decoder using Intel ISA-L library.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoDecode(org.apache.hadoop.io.erasurecode.rawcoder.ByteArrayDecodingState decodingState) Perform the real decoding using bytes array, supporting offsets and lengths.protected voiddoDecode(org.apache.hadoop.io.erasurecode.rawcoder.ByteBufferDecodingState decodingState) Perform the real decoding using Direct ByteBuffer.protected voidperformDecodeImpl(ByteBuffer[] inputs, int[] inputOffsets, int dataLen, int[] erased, ByteBuffer[] outputs, int[] outputOffsets) booleanTell if direct buffer is preferred or not.voidrelease()Should be called when release this coder.Methods inherited from class org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder
allowChangeInputs, allowVerboseDump, decode, decode, decode, getNumAllUnits, getNumDataUnits, getNumParityUnits
-
Field Details
-
LOG
public static org.slf4j.Logger LOG -
decoderLock
-
-
Constructor Details
-
NativeRSRawDecoder
-
-
Method Details
-
performDecodeImpl
protected void performDecodeImpl(ByteBuffer[] inputs, int[] inputOffsets, int dataLen, int[] erased, ByteBuffer[] outputs, int[] outputOffsets) throws IOException - Throws:
IOException
-
release
public void release()Description copied from class:RawErasureDecoderShould be called when release this coder. Good chance to release encoding or decoding buffers- Overrides:
releasein classRawErasureDecoder
-
preferDirectBuffer
public boolean preferDirectBuffer()Description copied from class:RawErasureDecoderTell if direct buffer is preferred or not. It's for callers to decide how to allocate coding chunk buffers, using DirectByteBuffer or bytes array. It will return false by default.- Returns:
- true if native buffer is preferred for performance consideration, otherwise false.
-
doDecode
protected void doDecode(org.apache.hadoop.io.erasurecode.rawcoder.ByteBufferDecodingState decodingState) throws IOException Description copied from class:RawErasureDecoderPerform the real decoding using Direct ByteBuffer.- Specified by:
doDecodein classRawErasureDecoder- Parameters:
decodingState- the decoding state- Throws:
IOException- raised on errors performing I/O.
-
doDecode
protected void doDecode(org.apache.hadoop.io.erasurecode.rawcoder.ByteArrayDecodingState decodingState) throws IOException Description copied from class:RawErasureDecoderPerform the real decoding using bytes array, supporting offsets and lengths.- Specified by:
doDecodein classRawErasureDecoder- Parameters:
decodingState- the decoding state- Throws:
IOException- if the decoder is closed.
-