Package org.apache.hadoop.hbase.util
Enum ChecksumType
- All Implemented Interfaces:
Serializable
,Comparable<ChecksumType>
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.
-
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 type with the specified name.static ChecksumType[]
values()
Returns an array containing the constants of this enum type, 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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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.
-