@InterfaceAudience.Private public class RowIndexCodecV1 extends AbstractDataBlockEncoder
AbstractDataBlockEncoder.AbstractEncodedSeeker
DataBlockEncoder.EncodedSeeker
Constructor and Description |
---|
RowIndexCodecV1() |
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.
|
int |
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.
|
ByteBuffer |
getFirstKeyInBlock(ByteBuffer block)
Return first key in block.
|
void |
startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx,
DataOutputStream out)
Starts encoding for a block of KeyValues.
|
newDataBlockDecodingContext, newDataBlockEncodingContext, postEncoding
public void startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx, DataOutputStream out) throws IOException
DataBlockEncoder
DataBlockEncoder.endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[])
to finish
encoding of a block.IOException
public int encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
DataBlockEncoder
IOException
public void endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader) throws IOException
DataBlockEncoder
IOException
public ByteBuffer decodeKeyValues(DataInputStream source, HFileBlockDecodingContext decodingCtx) throws IOException
DataBlockEncoder
source
- Compressed stream of KeyValues.IOException
- If there is an error in source.public ByteBuffer getFirstKeyInBlock(ByteBuffer block)
DataBlockEncoder
block
- encoded block we want index, the position will not changepublic DataBlockEncoder.EncodedSeeker createSeeker(KeyValue.KVComparator comparator, HFileBlockDecodingContext decodingCtx)
DataBlockEncoder
comparator
- what kind of comparison should be usedCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.