@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 |
|---|---|
int |
encode(Cell cell,
HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Encodes a KeyValue.
|
void |
endBlockEncoding(HFileBlockEncodingContext encodingCtx,
DataOutputStream out,
byte[] uncompressedBytesWithHeader,
BlockType blockType)
Ends encoding for a block of KeyValues.
|
DataBlockEncoding |
getDataBlockEncoding() |
DataBlockEncoding |
getEffectiveEncodingInCache(boolean isCompaction) |
HFileBlockDecodingContext |
newDataBlockDecodingContext(HFileContext fileContext)
create a encoder specific decoding context for reading.
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(byte[] headerBytes,
HFileContext fileContext)
Create an encoder specific encoding context object for writing.
|
void |
saveMetadata(HFile.Writer writer)
Save metadata in HFile which will be written to disk
|
void |
startBlockEncoding(HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Starts encoding for a block of KeyValues.
|
boolean |
useEncodedScanner()
Decides whether we should use a scanner over encoded blocks.
|
static final byte[] DATA_BLOCK_ENCODING
void startBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[], BlockType)
to finish encoding of a block.encodingCtx - out - IOExceptionint encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
cell - encodingCtx - out - IOExceptionvoid endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader, BlockType blockType) throws IOException
encodingCtx - out - uncompressedBytesWithHeader - blockType - IOExceptionboolean useEncodedScanner()
void saveMetadata(HFile.Writer writer) throws IOException
writer - writer for a given HFileIOException - on disk problemsDataBlockEncoding getDataBlockEncoding()
DataBlockEncoding getEffectiveEncodingInCache(boolean isCompaction)
HFileBlockEncodingContext newDataBlockEncodingContext(byte[] headerBytes, HFileContext fileContext)
headerBytes - header bytesfileContext - HFile meta dataHFileBlockEncodingContext objectHFileBlockDecodingContext newDataBlockDecodingContext(HFileContext fileContext)
fileContext - - HFile meta dataHFileBlockDecodingContext objectCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.