@InterfaceAudience.Private public interface DataBlockEncoder
encodeKeyValues(ByteBuffer, HFileBlockEncodingContext).| Modifier and Type | Interface and Description |
|---|---|
static interface |
DataBlockEncoder.EncodedSeeker
An interface which enable to seek while underlying data is encoded.
|
| Modifier and Type | Method and Description |
|---|---|
DataBlockEncoder.EncodedSeeker |
createSeeker(KeyValue.KVComparator comparator,
HFileBlockDecodingContext decodingCtx)
Create a HFileBlock seeker which find KeyValues within a block.
|
ByteBuffer |
decodeKeyValues(DataInputStream source,
HFileBlockDecodingContext decodingCtx)
Decode.
|
void |
encodeKeyValues(ByteBuffer in,
HFileBlockEncodingContext encodingCtx)
Encodes KeyValues.
|
ByteBuffer |
getFirstKeyInBlock(ByteBuffer block)
Return first key in block.
|
HFileBlockDecodingContext |
newDataBlockDecodingContext(HFileContext meta)
Creates an encoder specific decoding context, which will prepare the data
before actual decoding
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(DataBlockEncoding encoding,
byte[] headerBytes,
HFileContext meta)
Creates a encoder specific encoding context
|
void encodeKeyValues(ByteBuffer in, HFileBlockEncodingContext encodingCtx) throws IOException
in - Source of KeyValue for compression.encodingCtx - the encoding context which will contain encoded uncompressed bytes
as well as compressed encoded bytes if compression is enabled, and
also it will reuse resources across multiple calls.IOException - If there is an error writing to output stream.ByteBuffer decodeKeyValues(DataInputStream source, HFileBlockDecodingContext decodingCtx) throws IOException
source - Compressed stream of KeyValues.decodingCtx - IOException - If there is an error in source.ByteBuffer getFirstKeyInBlock(ByteBuffer block)
block - encoded block we want index, the position will not changeDataBlockEncoder.EncodedSeeker createSeeker(KeyValue.KVComparator comparator, HFileBlockDecodingContext decodingCtx)
comparator - what kind of comparison should be useddecodingCtx - HFileBlockEncodingContext newDataBlockEncodingContext(DataBlockEncoding encoding, byte[] headerBytes, HFileContext meta)
encoding - encoding strategy usedheaderBytes - header bytes to be written, put a dummy header here if the header
is unknownmeta - HFile meta dataHFileBlockDecodingContext newDataBlockDecodingContext(HFileContext meta)
meta - HFile meta dataCopyright © 2014 The Apache Software Foundation. All rights reserved.