Package org.apache.hadoop.io.erasurecode
Class CodecRegistry
java.lang.Object
org.apache.hadoop.io.erasurecode.CodecRegistry
This class registers all coder implementations.
CodecRegistry maps codec names to coder factories. All coder
factories are dynamically identified and loaded using ServiceLoader.-
Method Summary
Modifier and TypeMethodDescriptionGet all codec names and their corresponding coder list.Get all codec names.getCoderByName(String codecName, String coderName) Get a specific coder factory defined by codec name and coder name.String[]getCoderNames(String codecName) Get all coder names of the given codec.Get all coder factories of the given codec.static CodecRegistry
-
Method Details
-
getInstance
-
getCoderNames
Get all coder names of the given codec.- Parameters:
codecName- the name of codec- Returns:
- an array of all coder names, null if not exist
-
getCoders
Get all coder factories of the given codec.- Parameters:
codecName- the name of codec- Returns:
- a list of all coder factories, null if not exist
-
getCodecNames
Get all codec names.- Returns:
- a set of all codec names
-
getCoderByName
Get a specific coder factory defined by codec name and coder name.- Parameters:
codecName- name of the codeccoderName- name of the coder- Returns:
- the specific coder, null if not exist
-
getCodec2CoderCompactMap
Get all codec names and their corresponding coder list.- Returns:
- a map of all codec names, and their corresponding code list separated by ','.
-