org.apache.hadoop.hbase.io.encoding
Class HFileBlockDefaultDecodingContext
java.lang.Object
org.apache.hadoop.hbase.io.encoding.HFileBlockDefaultDecodingContext
- All Implemented Interfaces:
- HFileBlockDecodingContext
public class HFileBlockDefaultDecodingContext
- extends Object
- implements HFileBlockDecodingContext
A default implementation of HFileBlockDecodingContext
. It assumes the
block data section is compressed as a whole.
- See Also:
for the default compression context
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HFileBlockDefaultDecodingContext
public HFileBlockDefaultDecodingContext(Compression.Algorithm compressAlgo)
prepareDecoding
public void prepareDecoding(int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
ByteBuffer blockBufferWithoutHeader,
byte[] onDiskBlock,
int offset)
throws IOException
- Description copied from interface:
HFileBlockDecodingContext
- Perform all actions that need to be done before the encoder's real decoding process.
Decompression needs to be done if
HFileBlockDecodingContext.getCompression()
returns a valid compression
algorithm.
- Specified by:
prepareDecoding
in interface HFileBlockDecodingContext
- 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
getCompression
public Compression.Algorithm getCompression()
- Specified by:
getCompression
in interface HFileBlockDecodingContext
- Returns:
- the compression algorithm used by this decoding context
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.