@InterfaceAudience.Private public class RowIndexCodecV1 extends AbstractDataBlockEncoder
| Modifier and Type | Class and Description |
|---|---|
private static class |
RowIndexCodecV1.RowIndexEncodingState |
AbstractDataBlockEncoder.AbstractEncodedSeekerDataBlockEncoder.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, postEncodingpublic RowIndexCodecV1()
public void startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx, DataOutputStream out) throws IOException
DataBlockEncoderDataBlockEncoder.endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[]) to finish
encoding of a block.IOExceptionpublic int encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
DataBlockEncoderIOExceptionpublic void endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader) throws IOException
DataBlockEncoderIOExceptionpublic ByteBuffer decodeKeyValues(DataInputStream source, HFileBlockDecodingContext decodingCtx) throws IOException
DataBlockEncodersource - Compressed stream of KeyValues.IOException - If there is an error in source.public Cell getFirstKeyCellInBlock(ByteBuff block)
DataBlockEncoderblock - encoded block we want index, the position will not changepublic DataBlockEncoder.EncodedSeeker createSeeker(CellComparator comparator, HFileBlockDecodingContext decodingCtx)
DataBlockEncodercomparator - what kind of comparison should be usedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.