@InterfaceAudience.Private public class HFileBlockDefaultEncodingContext extends Object implements HFileBlockEncodingContext
HFileBlockEncodingContext. It will
compress the data section as one continuous buffer.for the decompression part| Constructor and Description |
|---|
HFileBlockDefaultEncodingContext(DataBlockEncoding encoding,
byte[] headerBytes,
HFileContext fileContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases the compressor this writer uses to compress blocks into the
compressor pool.
|
protected void |
compressAfterEncoding(byte[] uncompressedBytesWithHeader,
BlockType blockType,
byte[] headerBytes) |
void |
compressAfterEncodingWithBlockType(byte[] uncompressedBytesWithHeader,
BlockType blockType) |
BlockType |
getBlockType() |
DataBlockEncoding |
getDataBlockEncoding() |
HFileContext |
getHFileContext() |
byte[] |
getOnDiskBytesWithHeader() |
DataOutputStream |
getOutputStreamForEncoder() |
TagCompressionContext |
getTagCompressionContext() |
byte[] |
getUncompressedBytesWithHeader() |
void |
postEncoding(BlockType blockType)
Do any action that needs to be performed after the encoding.
|
void |
prepareEncoding()
prepare to start a new encoding.
|
void |
setDummyHeader(byte[] headerBytes)
sets the dummy header bytes
|
void |
setTagCompressionContext(TagCompressionContext tagCompressionContext) |
public HFileBlockDefaultEncodingContext(DataBlockEncoding encoding, byte[] headerBytes, HFileContext fileContext)
encoding - encoding usedheaderBytes - dummy header bytesfileContext - HFile meta datapublic void setDummyHeader(byte[] headerBytes)
HFileBlockEncodingContextsetDummyHeader in interface HFileBlockEncodingContextpublic void prepareEncoding()
throws IOException
IOExceptionpublic void postEncoding(BlockType blockType) throws IOException
HFileBlockEncodingContextpostEncoding in interface HFileBlockEncodingContextIOExceptionpublic void compressAfterEncodingWithBlockType(byte[] uncompressedBytesWithHeader,
BlockType blockType)
throws IOException
uncompressedBytesWithHeader - blockType - IOExceptionprotected void compressAfterEncoding(byte[] uncompressedBytesWithHeader,
BlockType blockType,
byte[] headerBytes)
throws IOException
uncompressedBytesWithHeader - blockType - headerBytes - IOExceptionpublic byte[] getOnDiskBytesWithHeader()
getOnDiskBytesWithHeader in interface HFileBlockEncodingContextpublic byte[] getUncompressedBytesWithHeader()
getUncompressedBytesWithHeader in interface HFileBlockEncodingContextpublic BlockType getBlockType()
getBlockType in interface HFileBlockEncodingContextpublic void close()
close in interface HFileBlockEncodingContextpublic DataOutputStream getOutputStreamForEncoder()
getOutputStreamForEncoder in interface HFileBlockEncodingContextpublic DataBlockEncoding getDataBlockEncoding()
getDataBlockEncoding in interface HFileBlockEncodingContextDataBlockEncoding encoding usedpublic HFileContext getHFileContext()
getHFileContext in interface HFileBlockEncodingContextpublic TagCompressionContext getTagCompressionContext()
public void setTagCompressionContext(TagCompressionContext tagCompressionContext)
Copyright © 2014 The Apache Software Foundation. All rights reserved.