Interface HFileBlockEncodingContext
- All Known Implementing Classes:
HFileBlockDefaultEncodingContext
An encoding context that is created by a writer's encoder, and is shared across the writer's
whole lifetime.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Releases the resources used.compressAndEncrypt
(byte[] data, int offset, int length) Compress and encrypt the supplied encoded block data with header.Returns the block type after encodingReturns theDataBlockEncoding
encoding usedReturns the encoding stateReturns HFile context informationvoid
postEncoding
(BlockType blockType) Do any action that needs to be performed after the encoding.void
setEncodingState
(EncodingState state) Sets the encoding state.
-
Method Details
-
getBlockType
Returns the block type after encoding -
getDataBlockEncoding
Returns theDataBlockEncoding
encoding used -
postEncoding
Do any action that needs to be performed after the encoding. Compression is also included if a non-null compression algorithm is used- Throws:
IOException
-
close
void close()Releases the resources used. -
getHFileContext
Returns HFile context information -
setEncodingState
Sets the encoding state. -
getEncodingState
Returns the encoding state -
compressAndEncrypt
Compress and encrypt the supplied encoded block data with header.- Parameters:
data
- encoded bytes with headeroffset
- the offset in encoded data to start atlength
- the number of encoded bytes- Returns:
- Bytes with header which are ready to write out to disk. This is compressed and encrypted bytes applying the set compression algorithm and encryption. The bytes may be changed. If need a Bytes reference for later use, clone the bytes and use that. Null if the data doesn't need to be compressed and encrypted.
- Throws:
IOException
-