|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<DataBlockEncoding>
org.apache.hadoop.hbase.io.encoding.DataBlockEncoding
@InterfaceAudience.Public @InterfaceStability.Evolving public enum DataBlockEncoding
Provide access to all data 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 | |
---|---|
DIFF
|
|
FAST_DIFF
|
|
NONE
Disable data block encoding. |
|
PREFIX
|
|
PREFIX_TREE
|
Field Summary | |
---|---|
static int |
ID_SIZE
|
Method Summary | |
---|---|
protected static DataBlockEncoder |
createEncoder(String fullyQualifiedClassName)
|
static DataBlockEncoder |
getDataBlockEncoderById(short encoderId)
Find and create data block encoder for given id; |
DataBlockEncoder |
getEncoder()
Return new data block encoder for given algorithm type. |
static DataBlockEncoding |
getEncodingById(short dataBlockEncodingId)
|
short |
getId()
|
static String |
getNameFromId(short encoderId)
Find and return the name of data block encoder for the given id. |
byte[] |
getNameInBytes()
|
static boolean |
isCorrectEncoder(DataBlockEncoder encoder,
short encoderId)
Check if given encoder has this id. |
static DataBlockEncoding |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static DataBlockEncoding[] |
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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final DataBlockEncoding NONE
public static final DataBlockEncoding PREFIX
public static final DataBlockEncoding DIFF
public static final DataBlockEncoding FAST_DIFF
public static final DataBlockEncoding PREFIX_TREE
Field Detail |
---|
public static final int ID_SIZE
Method Detail |
---|
public static DataBlockEncoding[] values()
for (DataBlockEncoding c : DataBlockEncoding.values()) System.out.println(c);
public static DataBlockEncoding valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic byte[] getNameInBytes()
public short getId()
public void writeIdInBytes(OutputStream stream) throws IOException
stream
- where the id should be written.
IOException
public void writeIdInBytes(byte[] dest, int offset) throws IOException
dest
- output arrayoffset
- starting offset of the output array
IOException
public DataBlockEncoder getEncoder()
public static DataBlockEncoder getDataBlockEncoderById(short encoderId)
encoderId
- id of data block encoder.
public static String getNameFromId(short encoderId)
encoderId
- id of data block encoder
public static boolean isCorrectEncoder(DataBlockEncoder encoder, short encoderId)
encoder
- encoder which id will be checkedencoderId
- id which we except
IllegalArgumentException
- thrown when there is no matching data block encoderpublic static DataBlockEncoding getEncodingById(short dataBlockEncodingId)
protected static DataBlockEncoder createEncoder(String fullyQualifiedClassName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |