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

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

# Class HHXORErasureDecoder

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.io.erasurecode.coder.ErasureDecoder
org.apache.hadoop.io.erasurecode.coder.HHXORErasureDecoder

All Implemented Interfaces:
  `Configurable`, `ErasureCoder`

@Private public class HHXORErasureDecoder extends ErasureDecoder
Hitchhiker is a new erasure coding algorithm developed as a research project at UC Berkeley by Rashmi Vinayak. It has been shown to reduce network traffic and disk I/O by 25%-45% during data reconstruction while retaining the same storage capacity and failure tolerance capability of RS codes. The Hitchhiker algorithm is described in K.V.Rashmi, et al., "A "Hitchhiker's" Guide to Fast and Efficient Data Reconstruction in Erasure-coded Data Centers", in ACM SIGCOMM 2014. This is Hitchhiker-XOR erasure decoder that decodes a block group.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HHXORErasureDecoder(ErasureCoderOptions options)`

- ## Method Summary

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

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

  `calculateCoding, getErasedIndexes, getInputBlocks, getNumDataUnits, getNumErasedBlocks, getNumErasedBlocks, 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

  - ### HHXORErasureDecoder

    public HHXORErasureDecoder(ErasureCoderOptions options)

- ## Method Details

  - ### prepareDecodingStep

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

  - ### 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 `ErasureDecoder`
    Returns:
      true if direct buffer is preferred for performance consideration, otherwise false.

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