org.apache.hadoop.io.erasurecode

## Class ECSchema

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

- All Implemented Interfaces:
    Serializable

      @InterfaceAudience.Public
       @InterfaceStability.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 and Description
    --- | ---
    `static String` | `CODEC_NAME_KEY`
    `static String` | `NUM_DATA_UNITS_KEY`
    `static String` | `NUM_PARITY_UNITS_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ECSchema(Map<String,String> allOptions)` Constructor with schema name and provided all options.
    `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.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getCodecName()` Get the codec name
    `Map<String,String>` | `getExtraOptions()` Get extra options specific to a 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 Detail

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

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

    - #### getCodecName

          public String getCodecName()

      Get the codec name
      Returns:
        codec name

    - #### getExtraOptions

          public Map<String,String> getExtraOptions()

      Get extra options specific to a 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`

Copyright © 2022 Apache Software Foundation. All rights reserved.