org.apache.hadoop.hbase.io.encoding
Interface HFileBlockDecodingContext
- All Known Implementing Classes:
- HFileBlockDefaultDecodingContext
public interface HFileBlockDecodingContext
A decoding context that is created by a reader's encoder, and is shared
across the reader's all read operations.
- See Also:
for encoding
getCompression
Compression.Algorithm getCompression()
- Returns:
- the compression algorithm used by this decoding context
prepareDecoding
void prepareDecoding(int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
ByteBuffer blockBufferWithoutHeader,
byte[] onDiskBlock,
int offset)
throws IOException
- Perform all actions that need to be done before the encoder's real decoding process.
Decompression needs to be done if
getCompression()
returns a valid compression
algorithm.
- Parameters:
onDiskSizeWithoutHeader
- numBytes after block and encoding headersuncompressedSizeWithoutHeader
- numBytes without header required to store the block after
decompressing (not decoding)blockBufferWithoutHeader
- ByteBuffer pointed after the header but before the dataonDiskBlock
- on disk bytes to be decodedoffset
- data start offset in onDiskBlock
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.