@InterfaceAudience.Public public enum DataBlockEncoding extends Enum<DataBlockEncoding>
枚举常量和说明 |
---|
DIFF |
FAST_DIFF |
NONE
Disable data block encoding.
|
PREFIX |
ROW_INDEX_V1 |
限定符和类型 | 字段和说明 |
---|---|
static int |
ID_SIZE |
限定符和类型 | 方法和说明 |
---|---|
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)
返回带有指定名称的该类型的枚举常量。
|
static DataBlockEncoding[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
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
- 要返回的枚举常量的名称。IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值public 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–2019 The Apache Software Foundation. All rights reserved.