Package com.linkedin.davinci.utils
Class ChunkAssembler
java.lang.Object
com.linkedin.davinci.utils.ChunkAssembler
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbufferAndAssembleRecord
(PubSubTopicPartition pubSubTopicPartition, int schemaId, byte[] keyBytes, ByteBuffer valueBytes, long recordOffset, int readerSchemaId, VeniceCompressor compressor) Buffers and assembles chunks of a record.<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.void
protected <T> T
decompressAndDeserialize
(RecordDeserializer<T> deserializer, VeniceCompressor compressor, ByteBuffer value)
-
Field Details
-
storeName
-
inMemoryStorageEngine
-
-
Constructor Details
-
ChunkAssembler
-
-
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()
-