@InterfaceAudience.Private public class CopyKeyDataBlockEncoder extends BufferedDataBlockEncoder
Modifier and Type | Class and Description |
---|---|
private static class |
CopyKeyDataBlockEncoder.CopyKeyEncodingState |
BufferedDataBlockEncoder.BufferedEncodedSeeker<STATE extends BufferedDataBlockEncoder.SeekerState>, BufferedDataBlockEncoder.OffheapDecodedExtendedCell, BufferedDataBlockEncoder.OnheapDecodedCell, BufferedDataBlockEncoder.SeekerState
AbstractDataBlockEncoder.AbstractEncodedSeeker
DataBlockEncoder.EncodedSeeker
Constructor and Description |
---|
CopyKeyDataBlockEncoder() |
Modifier and Type | Method and Description |
---|---|
DataBlockEncoder.EncodedSeeker |
createSeeker(CellComparator comparator,
HFileBlockDecodingContext decodingCtx)
Create a HFileBlock seeker which find KeyValues within a block.
|
Cell |
getFirstKeyCellInBlock(ByteBuff block)
Return first key in block as a cell.
|
protected ByteBuffer |
internalDecodeKeyValues(DataInputStream source,
int allocateHeaderLength,
int skipLastBytes,
HFileBlockDefaultDecodingContext decodingCtx) |
int |
internalEncode(Cell cell,
HFileBlockDefaultEncodingContext encodingContext,
DataOutputStream out) |
void |
startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx,
DataOutputStream out)
Starts encoding for a block of KeyValues.
|
String |
toString() |
afterDecodingKeyValue, afterEncodingKeyValue, compareCommonFamilyPrefix, compareCommonQualifierPrefix, compareCommonRowPrefix, decodeKeyValues, encode, endBlockEncoding, ensureSpace
createFirstKeyCell, newDataBlockDecodingContext, newDataBlockEncodingContext, postEncoding
public CopyKeyDataBlockEncoder()
public void startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx, DataOutputStream out) throws IOException
DataBlockEncoder
DataBlockEncoder.endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[])
to finish
encoding of a block.startBlockEncoding
in interface DataBlockEncoder
startBlockEncoding
in class BufferedDataBlockEncoder
IOException
public int internalEncode(Cell cell, HFileBlockDefaultEncodingContext encodingContext, DataOutputStream out) throws IOException
internalEncode
in class BufferedDataBlockEncoder
IOException
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 usedprotected ByteBuffer internalDecodeKeyValues(DataInputStream source, int allocateHeaderLength, int skipLastBytes, HFileBlockDefaultDecodingContext decodingCtx) throws IOException
internalDecodeKeyValues
in class BufferedDataBlockEncoder
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.