public interface HFileDataBlockEncoder
Modifier and Type | Field and Description |
---|---|
static byte[] |
DATA_BLOCK_ENCODING
Type of encoding used for data blocks in HFile.
|
Modifier and Type | Method and Description |
---|---|
Pair<ByteBuffer,BlockType> |
beforeWriteToDisk(ByteBuffer in,
boolean includesMemstoreTS,
byte[] dummyHeader)
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() |
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.
|
static final byte[] DATA_BLOCK_ENCODING
HFileBlock diskToCacheFormat(HFileBlock block, boolean isCompaction)
block
- a block in an on-disk format (read from HFile or freshly
generated).Pair<ByteBuffer,BlockType> beforeWriteToDisk(ByteBuffer in, boolean includesMemstoreTS, byte[] dummyHeader)
in
- KeyValues next to each otherdummyHeader
- A dummy header to be written as a placeholderboolean useEncodedScanner(boolean isCompaction)
isCompaction
- whether we are in a compaction.void saveMetadata(HFile.Writer writer) throws IOException
writer
- writer for a given HFileIOException
- on disk problemsDataBlockEncoding getEncodingOnDisk()
DataBlockEncoding getEncodingInCache()
DataBlockEncoding getEffectiveEncodingInCache(boolean isCompaction)
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.