public enum HFileBlockType extends Enum<HFileBlockType>
| Modifier and Type | Class and Description |
|---|---|
static class |
HFileBlockType.BlockCategory |
| Enum Constant and Description |
|---|
BLOOM_CHUNK
Bloom filter block, version 2
|
DATA
Data block
|
DELETE_FAMILY_BLOOM_META
Delete Family Bloom filter metadata, version 2
|
ENCODED_DATA
An encoded data block (e.g.
|
FILE_INFO
File info, version 2
|
GENERAL_BLOOM_META
General Bloom filter metadata, version 2
|
INDEX_V1
Block index magic string in version 1
|
INTERMEDIATE_INDEX
Intermediate-level version 2 index in the non-data block section
|
LEAF_INDEX
Version 2 leaf index block.
|
META
Meta blocks
|
ROOT_INDEX
Root index block, also used for the single-level meta index, version 2
|
TRAILER
Fixed file trailer, both versions (always just a magic string)
|
| Modifier and Type | Method and Description |
|---|---|
int |
getId()
Uses this instead of
Enum.ordinal(). |
static HFileBlockType |
parse(byte[] buf,
int offset)
Parses the block type from the block magic.
|
void |
readAndCheckMagic(DataInputStream in)
Reads a magic record of the length
DataSize.MAGIC_LENGTH from the given
stream and expects it to match this block type. |
static HFileBlockType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HFileBlockType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HFileBlockType DATA
public static final HFileBlockType ENCODED_DATA
public static final HFileBlockType LEAF_INDEX
public static final HFileBlockType BLOOM_CHUNK
public static final HFileBlockType META
public static final HFileBlockType INTERMEDIATE_INDEX
public static final HFileBlockType ROOT_INDEX
public static final HFileBlockType FILE_INFO
public static final HFileBlockType GENERAL_BLOOM_META
public static final HFileBlockType DELETE_FAMILY_BLOOM_META
public static final HFileBlockType TRAILER
public static final HFileBlockType INDEX_V1
public static HFileBlockType[] values()
for (HFileBlockType c : HFileBlockType.values()) System.out.println(c);
public static HFileBlockType 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 static HFileBlockType parse(byte[] buf, int offset) throws IOException
buf - input data.offset - offset to start reading.IOException - if the block magic is invalid.public int getId()
Enum.ordinal(). They work exactly the same, except
DATA and ENCODED_DATA get the same id using this method (overridden for
ENCODED_DATA).public void readAndCheckMagic(DataInputStream in) throws IOException
DataSize.MAGIC_LENGTH from the given
stream and expects it to match this block type.in - input data.IOException - when the magic is invalid.Copyright © 2024 The Apache Software Foundation. All rights reserved.