@InterfaceAudience.Public public enum DataBlockEncoding extends Enum<DataBlockEncoding>
Enum Constant and Description |
---|
DIFF |
FAST_DIFF |
NONE
Disable data block encoding.
|
PREFIX |
ROW_INDEX_V1 |
Modifier and Type | Field and Description |
---|---|
static int |
ID_SIZE |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.hbase.io.encoding.DataBlockEncoder |
getDataBlockEncoderById(short encoderId)
Find and create data block encoder for given id;
|
org.apache.hadoop.hbase.io.encoding.DataBlockEncoder |
getEncoder()
Return new data block encoder for given algorithm type.
|
static DataBlockEncoding |
getEncodingById(short dataBlockEncodingId) |
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[] |
getNameInBytes()
Returns name converted to bytes.
|
static boolean |
isCorrectEncoder(org.apache.hadoop.hbase.io.encoding.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.
|
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 ROW_INDEX_V1
public static final int ID_SIZE
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 nameNullPointerException
- 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 nIOException
public org.apache.hadoop.hbase.io.encoding.DataBlockEncoder getEncoder()
public static org.apache.hadoop.hbase.io.encoding.DataBlockEncoder getDataBlockEncoderById(short encoderId)
encoderId
- id of data block encoder.public static String getNameFromId(short encoderId)
encoderId
- id of data block encoderpublic static boolean isCorrectEncoder(org.apache.hadoop.hbase.io.encoding.DataBlockEncoder encoder, short encoderId)
encoder
- encoder which id will be checkedencoderId
- id which we exceptIllegalArgumentException
- thrown when there is no matching data block encoderpublic static DataBlockEncoding getEncodingById(short dataBlockEncodingId)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.