ECSchema (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.erasurecode, class: ECSchema

Package org.apache.hadoop.io.erasurecode

# Class ECSchema

java.lang.Object
org.apache.hadoop.io.erasurecode.ECSchema

All Implemented Interfaces:
  `Serializable`

@Public @Evolving public final class ECSchema extends Object implements Serializable
Erasure coding schema to housekeeper relevant information.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `CODEC_NAME_KEY`
  `static final String`
  `NUM_DATA_UNITS_KEY`
  `static final String`
  `NUM_PARITY_UNITS_KEY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ECSchema(String codecName, int numDataUnits, int numParityUnits)`
  Constructor with key parameters provided.
  `ECSchema(String codecName, int numDataUnits, int numParityUnits, Map<String,String> extraOptions)`
  Constructor with key parameters provided.
  `ECSchema(Map<String,String> allOptions)`
  Constructor with schema name and provided all options.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `String`
  `getCodecName()`
  Get the codec name
  `Map<String,String>`
  `getExtraOptions()`
  Get extra options specific to an erasure code.
  `int`
  `getNumDataUnits()`
  Get required data units count in a coding group
  `int`
  `getNumParityUnits()`
  Get required parity units count in a coding group
  `int`
  `hashCode()`
  `String`
  `toString()`
  Make a meaningful string representation for log output.

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### NUM_DATA_UNITS_KEY

    public static final String NUM_DATA_UNITS_KEY
    See Also:
      - Constant Field Values

  - ### NUM_PARITY_UNITS_KEY

    public static final String NUM_PARITY_UNITS_KEY
    See Also:
      - Constant Field Values

  - ### CODEC_NAME_KEY

    public static final String CODEC_NAME_KEY
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ECSchema

    public ECSchema(Map<String,String> allOptions)
    Constructor with schema name and provided all options. Note the options may contain additional information for the erasure codec to interpret further.
    Parameters:
      `allOptions` - all schema options

  - ### ECSchema

    public ECSchema(String codecName, int numDataUnits, int numParityUnits)
    Constructor with key parameters provided.
    Parameters:
      `codecName` - codec name
      `numDataUnits` - number of data units used in the schema
      `numParityUnits` - number os parity units used in the schema

  - ### ECSchema

    public ECSchema(String codecName, int numDataUnits, int numParityUnits, Map<String,String> extraOptions)
    Constructor with key parameters provided. Note the extraOptions may contain additional information for the erasure codec to interpret further.
    Parameters:
      `codecName` - codec name
      `numDataUnits` - number of data units used in the schema
      `numParityUnits` - number os parity units used in the schema
      `extraOptions` - extra options to configure the codec

- ## Method Details

  - ### getCodecName

    public String getCodecName()
    Get the codec name
    Returns:
      codec name

  - ### getExtraOptions

    public Map<String,String> getExtraOptions()
    Get extra options specific to an erasure code.
    Returns:
      extra options

  - ### getNumDataUnits

    public int getNumDataUnits()
    Get required data units count in a coding group
    Returns:
      count of data units

  - ### getNumParityUnits

    public int getNumParityUnits()
    Get required parity units count in a coding group
    Returns:
      count of parity units

  - ### toString

    public String toString()
    Make a meaningful string representation for log output.
    Overrides:
      `toString` in class `Object`
    Returns:
      string representation

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`