@Deprecated @InterfaceAudience.Private public class PrefixTreeCodec extends Object implements DataBlockEncoder
This class is created via reflection in DataBlockEncoding enum. Update the enum if class name or package changes.
PrefixTreeDataBlockEncoder implementation of DataBlockEncoder. This is the primary entry point for PrefixTree encoding and decoding. Encoding is delegated to instances ofPrefixTreeEncoder, and decoding is delegated to instances of
CellSearcher. Encoder and decoder instances are
created and recycled by static PtEncoderFactory and PtDecoderFactory.DataBlockEncoder.EncodedSeeker| Constructor and Description |
|---|
PrefixTreeCodec()
Deprecated.
no-arg constructor for reflection
|
| Modifier and Type | Method and Description |
|---|---|
DataBlockEncoder.EncodedSeeker |
createSeeker(KeyValue.KVComparator comparator,
HFileBlockDecodingContext decodingCtx)
Deprecated.
Is this the correct handling of an illegal comparator? How to prevent that from getting all
the way to this point.
|
ByteBuffer |
decodeKeyValues(DataInputStream source,
HFileBlockDecodingContext decodingCtx)
Deprecated.
Decode.
|
ByteBuffer |
decodeKeyValues(DataInputStream source,
int allocateHeaderLength,
int skipLastBytes,
HFileBlockDecodingContext decodingCtx)
Deprecated.
I don't think this method is called during normal HBase operation, so efficiency is not
important.
|
int |
encode(Cell cell,
HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Deprecated.
Encodes a KeyValue.
|
void |
endBlockEncoding(HFileBlockEncodingContext encodingCtx,
DataOutputStream out,
byte[] uncompressedBytesWithHeader)
Deprecated.
Ends encoding for a block of KeyValues.
|
ByteBuffer |
getFirstKeyInBlock(ByteBuffer block)
Deprecated.
Return first key in block.
|
HFileBlockDecodingContext |
newDataBlockDecodingContext(HFileContext meta)
Deprecated.
Creates an encoder specific decoding context, which will prepare the data
before actual decoding
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(DataBlockEncoding encoding,
byte[] header,
HFileContext meta)
Deprecated.
Creates a encoder specific encoding context
|
void |
startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx,
DataOutputStream out)
Deprecated.
Starts encoding for a block of KeyValues.
|
public PrefixTreeCodec()
public ByteBuffer decodeKeyValues(DataInputStream source, HFileBlockDecodingContext decodingCtx) throws IOException
DataBlockEncoderdecodeKeyValues in interface DataBlockEncodersource - Compressed stream of KeyValues.IOException - If there is an error in source.public ByteBuffer decodeKeyValues(DataInputStream source, int allocateHeaderLength, int skipLastBytes, HFileBlockDecodingContext decodingCtx) throws IOException
IOExceptionpublic ByteBuffer getFirstKeyInBlock(ByteBuffer block)
DataBlockEncodergetFirstKeyInBlock in interface DataBlockEncoderblock - encoded block we want index, the position will not changepublic HFileBlockEncodingContext newDataBlockEncodingContext(DataBlockEncoding encoding, byte[] header, HFileContext meta)
DataBlockEncodernewDataBlockEncodingContext in interface DataBlockEncoderencoding - encoding strategy usedheader - header bytes to be written, put a dummy header here if the header
is unknownmeta - HFile meta datapublic HFileBlockDecodingContext newDataBlockDecodingContext(HFileContext meta)
DataBlockEncodernewDataBlockDecodingContext in interface DataBlockEncodermeta - HFile meta datapublic DataBlockEncoder.EncodedSeeker createSeeker(KeyValue.KVComparator comparator, HFileBlockDecodingContext decodingCtx)
createSeeker in interface DataBlockEncodercomparator - what kind of comparison should be usedpublic int encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
DataBlockEncoderencode in interface DataBlockEncoderIOExceptionpublic void startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx, DataOutputStream out) throws IOException
DataBlockEncoderDataBlockEncoder.endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[]) to finish
encoding of a block.startBlockEncoding in interface DataBlockEncoderIOExceptionpublic void endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader) throws IOException
DataBlockEncoderendBlockEncoding in interface DataBlockEncoderIOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.