@InterfaceAudience.Private public class HFileBlockDefaultEncodingContext extends Object implements HFileBlockEncodingContext
HFileBlockEncodingContext
. It will
compress the data section as one continuous buffer.构造器和说明 |
---|
HFileBlockDefaultEncodingContext(DataBlockEncoding encoding,
byte[] headerBytes,
HFileContext fileContext) |
限定符和类型 | 方法和说明 |
---|---|
void |
close()
Releases the compressor this writer uses to compress blocks into the
compressor pool.
|
Bytes |
compressAndEncrypt(byte[] data,
int offset,
int length) |
BlockType |
getBlockType() |
DataBlockEncoding |
getDataBlockEncoding() |
EncodingState |
getEncodingState() |
HFileContext |
getHFileContext() |
TagCompressionContext |
getTagCompressionContext() |
void |
postEncoding(BlockType blockType)
Do any action that needs to be performed after the encoding.
|
void |
prepareEncoding(DataOutputStream out)
prepare to start a new encoding.
|
void |
setEncodingState(EncodingState state)
Sets the encoding state.
|
void |
setTagCompressionContext(TagCompressionContext tagCompressionContext) |
public HFileBlockDefaultEncodingContext(DataBlockEncoding encoding, byte[] headerBytes, HFileContext fileContext)
encoding
- encoding usedheaderBytes
- dummy header bytesfileContext
- HFile meta datapublic void prepareEncoding(DataOutputStream out) throws IOException
IOException
public void postEncoding(BlockType blockType) throws IOException
HFileBlockEncodingContext
postEncoding
在接口中 HFileBlockEncodingContext
IOException
public Bytes compressAndEncrypt(byte[] data, int offset, int length) throws IOException
compressAndEncrypt
在接口中 HFileBlockEncodingContext
data
- encoded bytes with headeroffset
- the offset in encoded data to start atlength
- the number of encoded bytesIOException
public BlockType getBlockType()
getBlockType
在接口中 HFileBlockEncodingContext
public void close()
close
在接口中 HFileBlockEncodingContext
public DataBlockEncoding getDataBlockEncoding()
getDataBlockEncoding
在接口中 HFileBlockEncodingContext
DataBlockEncoding
encoding usedpublic HFileContext getHFileContext()
getHFileContext
在接口中 HFileBlockEncodingContext
public TagCompressionContext getTagCompressionContext()
public void setTagCompressionContext(TagCompressionContext tagCompressionContext)
public EncodingState getEncodingState()
getEncodingState
在接口中 HFileBlockEncodingContext
public void setEncodingState(EncodingState state)
HFileBlockEncodingContext
setEncodingState
在接口中 HFileBlockEncodingContext
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.