Class NativeRSRawEncoder

java.lang.Object
org.apache.hadoop.io.erasurecode.rawcoder.RawErasureEncoder
org.apache.hadoop.io.erasurecode.rawcoder.NativeRSRawEncoder

@Private public class NativeRSRawEncoder extends RawErasureEncoder
A Reed-Solomon raw encoder using Intel ISA-L library.
  • Field Details

  • Constructor Details

  • Method Details

    • performEncodeImpl

      protected void performEncodeImpl(ByteBuffer[] inputs, int[] inputOffsets, int dataLen, ByteBuffer[] outputs, int[] outputOffsets) throws IOException
      Throws:
      IOException
    • release

      public void release()
      Description copied from class: RawErasureEncoder
      Should be called when release this coder. Good chance to release encoding or decoding buffers
      Overrides:
      release in class RawErasureEncoder
    • preferDirectBuffer

      public boolean preferDirectBuffer()
      Description copied from class: RawErasureEncoder
      Tell 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.
    • doEncode

      protected void doEncode(org.apache.hadoop.io.erasurecode.rawcoder.ByteBufferEncodingState encodingState) throws IOException
      Description copied from class: RawErasureEncoder
      Perform the real encoding work using direct ByteBuffer.
      Specified by:
      doEncode in class RawErasureEncoder
      Parameters:
      encodingState - the encoding state.
      Throws:
      IOException - raised on errors performing I/O.
    • doEncode

      protected void doEncode(org.apache.hadoop.io.erasurecode.rawcoder.ByteArrayEncodingState encodingState) throws IOException
      Description copied from class: RawErasureEncoder
      Perform the real encoding work using bytes array, supporting offsets and lengths.
      Specified by:
      doEncode in class RawErasureEncoder
      Parameters:
      encodingState - the encoding state
      Throws:
      IOException - raised on errors performing I/O.