Class ChunkAssembler

java.lang.Object
com.linkedin.davinci.utils.ChunkAssembler

public class ChunkAssembler extends Object
  • Field Details

  • Constructor Details

    • ChunkAssembler

      public ChunkAssembler(String storeName)
  • Method Details

    • bufferAndAssembleRecord

      public <T> T bufferAndAssembleRecord(PubSubTopicPartition pubSubTopicPartition, int schemaId, byte[] keyBytes, ByteBuffer valueBytes, long recordOffset, Lazy<RecordDeserializer<T>> recordDeserializer, int readerSchemaId, VeniceCompressor compressor)
      Buffers and assembles chunks of a record. If the record is chunked, it stores the chunks and returns null. Once all chunks of a record are received, it assembles, decompresses, and deserializes the record.
    • bufferAndAssembleRecord

      public ByteBuffer bufferAndAssembleRecord(PubSubTopicPartition pubSubTopicPartition, int schemaId, byte[] keyBytes, ByteBuffer valueBytes, long recordOffset, int readerSchemaId, VeniceCompressor compressor)
      Buffers and assembles chunks of a record. If the record is chunked, it stores the chunks and returns null. Once all chunks of a record are received, it returns the compressed and serialized assembled record.
    • decompressAndDeserialize

      protected <T> T decompressAndDeserialize(RecordDeserializer<T> deserializer, VeniceCompressor compressor, ByteBuffer value) throws IOException
      Throws:
      IOException
    • clearInMemoryDB

      public void clearInMemoryDB()