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

Method Summary
 Compression.Algorithm getCompression()
           
 void prepareDecoding(int onDiskSizeWithoutHeader, int uncompressedSizeWithoutHeader, ByteBuffer blockBufferWithoutHeader, byte[] onDiskBlock, int offset)
          Perform all actions that need to be done before the encoder's real decoding process.
 

Method Detail

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 headers
uncompressedSizeWithoutHeader - numBytes without header required to store the block after decompressing (not decoding)
blockBufferWithoutHeader - ByteBuffer pointed after the header but before the data
onDiskBlock - on disk bytes to be decoded
offset - data start offset in onDiskBlock
Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.