RSErasureEncoder (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.erasurecode.coder, class: RSErasureEncoder

Package org.apache.hadoop.io.erasurecode.coder

# 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`

@Private public class RSErasureEncoder extends ErasureEncoder
Reed-Solomon erasure encoder that encodes a block group. It implements `ErasureCoder`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RSErasureEncoder(ErasureCoderOptions options)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `preferDirectBuffer()`
  Tell if direct or off-heap buffer is preferred or not.
  `protected ErasureCodingStep`
  `prepareEncodingStep(ECBlockGroup blockGroup)`
  Perform encoding against a block group.
  `void`
  `release()`
  Release the resources if any.

  ### Methods inherited from class org.apache.hadoop.io.erasurecode.coder.ErasureEncoder

  `calculateCoding, getInputBlocks, getNumDataUnits, getNumParityUnits, getOptions, getOutputBlocks`

  ### Methods inherited from class org.apache.hadoop.conf.Configured

  `getConf, setConf`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.hadoop.conf.Configurable

  `getConf, setConf`

- ## Constructor Details

  - ### RSErasureEncoder

    public RSErasureEncoder(ErasureCoderOptions options)

- ## Method Details

  - ### prepareEncodingStep

    protected ErasureCodingStep prepareEncodingStep(ECBlockGroup blockGroup)
    Description copied from class: `ErasureEncoder`
    Perform encoding against a block group.
    Specified by:
      `prepareEncodingStep` in class `ErasureEncoder`
    Parameters:
      `blockGroup` - blockGroup.
    Returns:
      encoding step for caller to do the real work

  - ### release

    public void release()
    Description copied from interface: `ErasureCoder`
    Release the resources if any. Good chance to invoke RawErasureCoder#release.
    Specified by:
      `release` in interface `ErasureCoder`
    Overrides:
      `release` in class `ErasureEncoder`

  - ### preferDirectBuffer

    public boolean preferDirectBuffer()
    Description copied from interface: `ErasureCoder`
    Tell 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:
      `preferDirectBuffer` in interface `ErasureCoder`
    Overrides:
      `preferDirectBuffer` in class `ErasureEncoder`
    Returns:
      true if direct buffer is preferred for performance consideration, otherwise false.