@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 |
---|---|
private DataBlockEncoder |
encoder |
private String |
encoderCls |
private short |
id |
static int |
ID_SIZE |
private static DataBlockEncoding[] |
idArray
Maps data block encoding ids to enum instances.
|
private byte[] |
idInBytes |
Modifier and Type | Method and Description |
---|---|
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.
|
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
private final short id
private final byte[] idInBytes
private DataBlockEncoder encoder
private final String encoderCls
public static final int ID_SIZE
private static DataBlockEncoding[] idArray
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 arrayIOException
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 encoderpublic static boolean isCorrectEncoder(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)
protected static DataBlockEncoder createEncoder(String fullyQualifiedClassName)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.