@InterfaceAudience.Private public class RowIndexCodecV1 extends AbstractDataBlockEncoder
Modifier and Type | Class and Description |
---|---|
private static class |
RowIndexCodecV1.RowIndexEncodingState |
AbstractDataBlockEncoder.AbstractEncodedSeeker
DataBlockEncoder.EncodedSeeker
Constructor and Description |
---|
RowIndexCodecV1() |
Modifier and Type | Method and Description |
---|---|
DataBlockEncoder.EncodedSeeker |
createSeeker(CellComparator 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.
|
Cell |
getFirstKeyCellInBlock(ByteBuff block)
Return first key in block as a cell.
|
void |
startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx,
DataOutputStream out)
Starts encoding for a block of KeyValues.
|
createFirstKeyCell, newDataBlockDecodingContext, newDataBlockEncodingContext, postEncoding
public RowIndexCodecV1()
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 Cell getFirstKeyCellInBlock(ByteBuff block)
DataBlockEncoder
block
- encoded block we want index, the position will not changepublic DataBlockEncoder.EncodedSeeker createSeeker(CellComparator comparator, HFileBlockDecodingContext decodingCtx)
DataBlockEncoder
comparator
- what kind of comparison should be usedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.