Interface HFileBlockEncodingContext

All Known Implementing Classes:
HFileBlockDefaultEncodingContext

@Private public interface HFileBlockEncodingContext
An encoding context that is created by a writer's encoder, and is shared across the writer's whole lifetime.
See Also:
  • Method Details

    • getBlockType

      Returns the block type after encoding
    • getDataBlockEncoding

      Returns the DataBlockEncoding encoding used
    • postEncoding

      void postEncoding(BlockType blockType) throws IOException
      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

      Bytes compressAndEncrypt(byte[] data, int offset, int length) throws IOException
      Compress and encrypt the supplied encoded block data with header.
      Parameters:
      data - encoded bytes with header
      offset - the offset in encoded data to start at
      length - 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