org.apache.hadoop.hbase.io.encoding
Class HFileBlockDefaultDecodingContext

java.lang.Object
  extended by org.apache.hadoop.hbase.io.encoding.HFileBlockDefaultDecodingContext
All Implemented Interfaces:
HFileBlockDecodingContext

@InterfaceAudience.Private
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

Constructor Summary
HFileBlockDefaultDecodingContext(HFileContext fileContext)
           
 
Method Summary
 HFileContext getHFileContext()
           
 TagCompressionContext getTagCompressionContext()
           
 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.
 void setTagCompressionContext(TagCompressionContext tagCompressionContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HFileBlockDefaultDecodingContext

public HFileBlockDefaultDecodingContext(HFileContext fileContext)
Method Detail

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 HFileContext.getCompression() returns a valid compression algorithm.

Specified by:
prepareDecoding in interface HFileBlockDecodingContext
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

getHFileContext

public HFileContext getHFileContext()
Specified by:
getHFileContext in interface HFileBlockDecodingContext
Returns:
HFile meta information

getTagCompressionContext

public TagCompressionContext getTagCompressionContext()

setTagCompressionContext

public void setTagCompressionContext(TagCompressionContext tagCompressionContext)


Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.