public interface DataBlockEncoder
Modifier and Type | Interface and Description |
---|---|
static interface |
DataBlockEncoder.EncodedSeeker
An interface which enable to seek while underlying data is encoded.
|
Modifier and Type | Method and Description |
---|---|
void |
compressKeyValues(DataOutputStream out,
ByteBuffer in,
boolean includesMemstoreTS)
Compress KeyValues and write them to output buffer.
|
DataBlockEncoder.EncodedSeeker |
createSeeker(org.apache.hadoop.io.RawComparator<byte[]> comparator,
boolean includesMemstoreTS)
Create a HFileBlock seeker which find KeyValues within a block.
|
ByteBuffer |
getFirstKeyInBlock(ByteBuffer block)
Return first key in block.
|
ByteBuffer |
uncompressKeyValues(DataInputStream source,
boolean includesMemstoreTS)
Uncompress.
|
ByteBuffer |
uncompressKeyValues(DataInputStream source,
int allocateHeaderLength,
int skipLastBytes,
boolean includesMemstoreTS)
Uncompress.
|
void compressKeyValues(DataOutputStream out, ByteBuffer in, boolean includesMemstoreTS) throws IOException
out
- Where to write compressed data.in
- Source of KeyValue for compression.includesMemstoreTS
- true if including memstore timestamp after every
key-value pairIOException
- If there is an error writing to output stream.ByteBuffer uncompressKeyValues(DataInputStream source, boolean includesMemstoreTS) throws IOException
source
- Compressed stream of KeyValues.includesMemstoreTS
- true if including memstore timestamp after every
key-value pairIOException
- If there is an error in source.ByteBuffer uncompressKeyValues(DataInputStream source, int allocateHeaderLength, int skipLastBytes, boolean includesMemstoreTS) throws IOException
source
- Compressed stream of KeyValues.allocateHeaderLength
- allocate this many bytes for the header.skipLastBytes
- Do not copy n last bytes.includesMemstoreTS
- true if including memstore timestamp after every
key-value pairIOException
- If there is an error in source.ByteBuffer getFirstKeyInBlock(ByteBuffer block)
block
- encoded block we want index, the position will not changeDataBlockEncoder.EncodedSeeker createSeeker(org.apache.hadoop.io.RawComparator<byte[]> comparator, boolean includesMemstoreTS)
comparator
- what kind of comparison should be usedincludesMemstoreTS
- true if including memstore timestamp after every
key-value pairCopyright © 2014 The Apache Software Foundation. All Rights Reserved.