@InterfaceAudience.Private
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 |
---|---|
void |
beforeWriteToDisk(ByteBuffer in,
boolean includesMemstoreTS,
HFileBlockEncodingContext encodingResult,
BlockType blockType)
Should be called before an encoded or unencoded data block is written to
disk.
|
DataBlockEncoding |
getDataBlockEncoding() |
HFileBlockDecodingContext |
newDataBlockDecodingContext(Compression.Algorithm compressionAlgorithm)
create a encoder specific decoding context for reading.
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(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()
Decides whether we should use a scanner over encoded blocks.
|
static final byte[] DATA_BLOCK_ENCODING
void beforeWriteToDisk(ByteBuffer in, boolean includesMemstoreTS, HFileBlockEncodingContext encodingResult, BlockType blockType) throws IOException
in
- KeyValues next to each otherencodingResult
- the encoded resultblockType
- block typeIOException
boolean useEncodedScanner()
void saveMetadata(HFile.Writer writer) throws IOException
writer
- writer for a given HFileIOException
- on disk problemsDataBlockEncoding getDataBlockEncoding()
HFileBlockEncodingContext newDataBlockEncodingContext(Compression.Algorithm compressionAlgorithm, byte[] headerBytes)
compressionAlgorithm
- compression algorithmheaderBytes
- header bytesHFileBlockEncodingContext
objectHFileBlockDecodingContext newDataBlockDecodingContext(Compression.Algorithm compressionAlgorithm)
compressionAlgorithm
- HFileBlockDecodingContext
objectCopyright © 2014 The Apache Software Foundation. All rights reserved.