|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.io.encoding.HFileBlockDefaultEncodingContext
public class HFileBlockDefaultEncodingContext
A default implementation of HFileBlockEncodingContext. It will
compress the data section as one continuous buffer.
for the decompression part| Constructor Summary | |
|---|---|
HFileBlockDefaultEncodingContext(Compression.Algorithm compressionAlgorithm,
DataBlockEncoding encoding,
byte[] headerBytes)
|
|
| Method Summary | |
|---|---|
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()
|
Compression.Algorithm |
getCompression()
|
DataBlockEncoding |
getDataBlockEncoding()
|
byte[] |
getOnDiskBytesWithHeader()
|
DataOutputStream |
getOutputStreamForEncoder()
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HFileBlockDefaultEncodingContext(Compression.Algorithm compressionAlgorithm,
DataBlockEncoding encoding,
byte[] headerBytes)
compressionAlgorithm - compression algorithm usedencoding - encoding usedheaderBytes - dummy header bytes| Method Detail |
|---|
public void setDummyHeader(byte[] headerBytes)
HFileBlockEncodingContext
setDummyHeader in interface HFileBlockEncodingContext
public void prepareEncoding()
throws IOException
IOException
public void postEncoding(BlockType blockType)
throws IOException
HFileBlockEncodingContextHFileBlockEncodingContext.getCompression() returns non-null
compression algorithm
postEncoding in interface HFileBlockEncodingContextIOException
public void compressAfterEncodingWithBlockType(byte[] uncompressedBytesWithHeader,
BlockType blockType)
throws IOException
uncompressedBytesWithHeader - blockType -
IOException
protected 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 Compression.Algorithm getCompression()
getCompression in interface HFileBlockEncodingContextpublic DataOutputStream getOutputStreamForEncoder()
getOutputStreamForEncoder in interface HFileBlockEncodingContextpublic DataBlockEncoding getDataBlockEncoding()
getDataBlockEncoding in interface HFileBlockEncodingContextDataBlockEncoding encoding used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||