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:
  • Field Details

  • 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