|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Private public interface HFileDataBlockEncoder
Controls what kind of data block encoding is used. If data block encoding is not set or the given block is not a data block (encoded or not), methods should just return the unmodified block.
Field Summary | |
---|---|
static byte[] |
DATA_BLOCK_ENCODING
Type of encoding used for data blocks in HFile. |
Method Summary | |
---|---|
void |
beforeWriteToDisk(ByteBuffer in,
boolean includesMemstoreTS,
HFileBlockEncodingContext encodingResult,
BlockType blockType)
Should be called before an encoded or unencoded data block is written to disk. |
HFileBlock |
diskToCacheFormat(HFileBlock block,
boolean isCompaction)
Converts a block from the on-disk format to the in-cache format. |
DataBlockEncoding |
getEffectiveEncodingInCache(boolean isCompaction)
|
DataBlockEncoding |
getEncodingInCache()
|
DataBlockEncoding |
getEncodingOnDisk()
|
HFileBlockDecodingContext |
newOnDiskDataBlockDecodingContext(Compression.Algorithm compressionAlgorithm)
create a encoder specific decoding context for reading. |
HFileBlockEncodingContext |
newOnDiskDataBlockEncodingContext(Compression.Algorithm compressionAlgorithm,
byte[] headerBytes)
Create an encoder specific encoding context object for writing. |
void |
saveMetadata(HFile.Writer writer)
Save metadata in HFile which will be written to disk |
boolean |
useEncodedScanner(boolean isCompaction)
Decides whether we should use a scanner over encoded blocks. |
Field Detail |
---|
static final byte[] DATA_BLOCK_ENCODING
Method Detail |
---|
HFileBlock diskToCacheFormat(HFileBlock block, boolean isCompaction)
block
- a block in an on-disk format (read from HFile or freshly
generated).
void beforeWriteToDisk(ByteBuffer in, boolean includesMemstoreTS, HFileBlockEncodingContext encodingResult, BlockType blockType) throws IOException
in
- KeyValues next to each otherencodingResult
- the encoded resultblockType
- block type
IOException
boolean useEncodedScanner(boolean isCompaction)
isCompaction
- whether we are in a compaction.
void saveMetadata(HFile.Writer writer) throws IOException
writer
- writer for a given HFile
IOException
- on disk problemsDataBlockEncoding getEncodingOnDisk()
DataBlockEncoding getEncodingInCache()
DataBlockEncoding getEffectiveEncodingInCache(boolean isCompaction)
HFileBlockEncodingContext newOnDiskDataBlockEncodingContext(Compression.Algorithm compressionAlgorithm, byte[] headerBytes)
compressionAlgorithm
- compression algorithmheaderBytes
- header bytes
HFileBlockEncodingContext
objectHFileBlockDecodingContext newOnDiskDataBlockDecodingContext(Compression.Algorithm compressionAlgorithm)
compressionAlgorithm
-
HFileBlockDecodingContext
object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |