Package org.apache.hadoop.io.erasurecode
Class ECSchema
java.lang.Object
org.apache.hadoop.io.erasurecode.ECSchema
- All Implemented Interfaces:
Serializable
Erasure coding schema to housekeeper relevant information.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with key parameters provided.Constructor with key parameters provided.Constructor with schema name and provided all options. -
Method Summary
-
Field Details
-
NUM_DATA_UNITS_KEY
- See Also:
-
NUM_PARITY_UNITS_KEY
- See Also:
-
CODEC_NAME_KEY
- See Also:
-
-
Constructor Details
-
ECSchema
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
Constructor with key parameters provided.- Parameters:
codecName- codec namenumDataUnits- number of data units used in the schemanumParityUnits- 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 namenumDataUnits- number of data units used in the schemanumParityUnits- number os parity units used in the schemaextraOptions- extra options to configure the codec
-
-
Method Details
-
getCodecName
Get the codec name- Returns:
- codec name
-
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
Make a meaningful string representation for log output. -
equals
-
hashCode
public int hashCode()
-