@InterfaceAudience.Private public class PrefixTreeCodec extends Object implements DataBlockEncoder
PrefixTreeEncoder
, 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()
no-arg constructor for reflection
|
Modifier and Type | Method and Description |
---|---|
DataBlockEncoder.EncodedSeeker |
createSeeker(KeyValue.KVComparator comparator,
HFileBlockDecodingContext decodingCtx)
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) |
ByteBuffer |
decodeKeyValues(DataInputStream source,
int allocateHeaderLength,
int skipLastBytes,
HFileBlockDecodingContext decodingCtx)
I don't think this method is called during normal HBase operation, so efficiency is not
important.
|
void |
encodeKeyValues(ByteBuffer in,
HFileBlockEncodingContext blkEncodingCtx)
Copied from BufferedDataBlockEncoder.
|
ByteBuffer |
getFirstKeyInBlock(ByteBuffer block) |
HFileBlockDecodingContext |
newDataBlockDecodingContext(HFileContext meta) |
HFileBlockEncodingContext |
newDataBlockEncodingContext(DataBlockEncoding encoding,
byte[] header,
HFileContext meta) |
public void encodeKeyValues(ByteBuffer in, HFileBlockEncodingContext blkEncodingCtx) throws IOException
encodeKeyValues
in interface DataBlockEncoder
IOException
public ByteBuffer decodeKeyValues(DataInputStream source, HFileBlockDecodingContext decodingCtx) throws IOException
decodeKeyValues
in interface DataBlockEncoder
IOException
public ByteBuffer decodeKeyValues(DataInputStream source, int allocateHeaderLength, int skipLastBytes, HFileBlockDecodingContext decodingCtx) throws IOException
IOException
public ByteBuffer getFirstKeyInBlock(ByteBuffer block)
getFirstKeyInBlock
in interface DataBlockEncoder
public HFileBlockEncodingContext newDataBlockEncodingContext(DataBlockEncoding encoding, byte[] header, HFileContext meta)
newDataBlockEncodingContext
in interface DataBlockEncoder
public HFileBlockDecodingContext newDataBlockDecodingContext(HFileContext meta)
newDataBlockDecodingContext
in interface DataBlockEncoder
public DataBlockEncoder.EncodedSeeker createSeeker(KeyValue.KVComparator comparator, HFileBlockDecodingContext decodingCtx)
createSeeker
in interface DataBlockEncoder
Copyright © 2015 The Apache Software Foundation. All Rights Reserved.