@InterfaceAudience.Private public interface DataBlockEncoder
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(HFileBlockDecodingContext decodingCtx)
Create a HFileBlock seeker which find KeyValues within a block.
|
ByteBuffer |
decodeKeyValues(DataInputStream source,
HFileBlockDecodingContext decodingCtx)
Decode.
|
void |
encode(Cell cell,
HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Encodes a KeyValue.
|
void |
endBlockEncoding(HFileBlockEncodingContext encodingCtx,
DataOutputStream out,
byte[] uncompressedBytesWithHeader)
Ends encoding for a block of KeyValues.
|
Cell |
getFirstKeyCellInBlock(ByteBuff block)
Return first key in block as a cell.
|
HFileBlockDecodingContext |
newDataBlockDecodingContext(org.apache.hadoop.conf.Configuration conf,
HFileContext meta)
Creates an encoder specific decoding context, which will prepare the data before actual
decoding n * store configuration n * HFile meta data
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(org.apache.hadoop.conf.Configuration conf,
DataBlockEncoding encoding,
byte[] headerBytes,
HFileContext meta)
Creates a encoder specific encoding context n * store configuration n * encoding strategy used
n * header bytes to be written, put a dummy header here if the header is unknown n * HFile meta
data
|
void |
startBlockEncoding(HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Starts encoding for a block of KeyValues.
|
void startBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[])
to finish
encoding of a block.IOException
void encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
EncodingState.postCellEncode(int, int)
needs to
be called to keep track of the encoded and unencoded data sizeIOException
void endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader) throws IOException
IOException
ByteBuffer decodeKeyValues(DataInputStream source, HFileBlockDecodingContext decodingCtx) throws IOException
source
- Compressed stream of KeyValues.IOException
- If there is an error in source.Cell getFirstKeyCellInBlock(ByteBuff block)
block
- encoded block we want index, the position will not changeDataBlockEncoder.EncodedSeeker createSeeker(HFileBlockDecodingContext decodingCtx)
HFileBlockEncodingContext newDataBlockEncodingContext(org.apache.hadoop.conf.Configuration conf, DataBlockEncoding encoding, byte[] headerBytes, HFileContext meta)
HFileBlockDecodingContext newDataBlockDecodingContext(org.apache.hadoop.conf.Configuration conf, HFileContext meta)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.