Enum IndexBlockEncoding
- All Implemented Interfaces:
Serializable
,Comparable<IndexBlockEncoding>
Provide access to all index block encoding algorithms. All of the algorithms are required to have
unique id which should NEVER be changed. If you want to add a new algorithm/version,
assign it a new id. Announce the new id in the HBase mailing list to prevent collisions.
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final short
static final int
private static IndexBlockEncoding[]
Maps data block encoding ids to enum instances.private final byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IndexBlockEncoding
getEncodingById
(short indexBlockEncodingId) short
getId()
Returns The id of a data block encoder.static String
getNameFromId
(short encoderId) Find and return the name of data block encoder for the given id.byte[]
Returns name converted to bytes.static IndexBlockEncoding
Returns the enum constant of this type with the specified name.static IndexBlockEncoding[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.void
writeIdInBytes
(byte[] dest, int offset) Writes id bytes to the given array starting from offset.void
writeIdInBytes
(OutputStream stream) Writes id in bytes.
-
Enum Constant Details
-
NONE
Disable index block encoding. -
PREFIX_TREE
-
-
Field Details
-
id
-
idInBytes
-
encoderCls
-
ID_SIZE
- See Also:
-
idArray
Maps data block encoding ids to enum instances.
-
-
Constructor Details
-
IndexBlockEncoding
-
-
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
-
getNameInBytes
Returns name converted to bytes. -
getId
Returns The id of a data block encoder. -
writeIdInBytes
Writes id in bytes.- Parameters:
stream
- where the id should be written.- Throws:
IOException
-
writeIdInBytes
Writes id bytes to the given array starting from offset.- Parameters:
dest
- output arrayoffset
- starting offset of the output array- Throws:
IOException
-
getNameFromId
Find and return the name of data block encoder for the given id.- Parameters:
encoderId
- id of data block encoder- Returns:
- name, same as used in options in column family
-
getEncodingById
-