@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 |
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()
Returns the data block encoding
|
DataBlockEncoding |
getEffectiveEncodingInCache(boolean isCompaction) |
HFileBlockDecodingContext |
newDataBlockDecodingContext(org.apache.hadoop.conf.Configuration conf,
HFileContext fileContext)
create a encoder specific decoding context for reading.
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(org.apache.hadoop.conf.Configuration conf,
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. nnnIOException
void encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
IOException
void endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader, BlockType blockType) throws IOException
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(org.apache.hadoop.conf.Configuration conf, byte[] headerBytes, HFileContext fileContext)
conf
- store configurationheaderBytes
- header bytesfileContext
- HFile meta dataHFileBlockEncodingContext
objectHFileBlockDecodingContext newDataBlockDecodingContext(org.apache.hadoop.conf.Configuration conf, HFileContext fileContext)
conf
- store configurationfileContext
- - HFile meta dataHFileBlockDecodingContext
objectCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.