Package org.apache.hadoop.hbase.util
Enum Class ChecksumType
- All Implemented Interfaces:
Serializable
,Comparable<ChecksumType>
,Constable
Checksum types. The Checksum type is a one byte number that stores a representation of the
checksum algorithm used to encode a hfile. The ordinal of these cannot change or else you risk
breaking all existing HFiles out there.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChecksumType
codeToType
(byte b) Cannot rely on enum ordinals .byte
getCode()
abstract org.apache.hadoop.util.DataChecksum.Type
Function to get correspondingDataChecksum.Type
.static ChecksumType
abstract String
getName()
returns the name of this checksum typestatic ChecksumType
nameToType
(String name) Map a checksum name to a specific type.static ChecksumType
Returns the enum constant of this class with the specified name.static ChecksumType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NULL
-
CRC32
-
CRC32C
-
-
Field Details
-
code
-
-
Constructor Details
-
ChecksumType
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getDefaultChecksumType
-
getName
returns the name of this checksum type -
getDataChecksumType
Function to get correspondingDataChecksum.Type
. -
getCode
-
codeToType
Cannot rely on enum ordinals . They change if item is removed or moved. Do our own codes.- Returns:
- Type associated with passed code.
-
nameToType
Map a checksum name to a specific type. Do our own names.- Returns:
- Type associated with passed code.
-