@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
- IOException
int encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
cell
- encodingCtx
- out
- IOException
void endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader, BlockType blockType) throws IOException
encodingCtx
- out
- uncompressedBytesWithHeader
- blockType
- IOException
boolean 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–2019 Cloudera. All rights reserved.