Class StoreWriteComputeProcessor
java.lang.Object
com.linkedin.davinci.kafka.consumer.StoreWriteComputeProcessor
This class handles Write Compute operations related to a specific store.
-
Constructor Summary
ConstructorDescriptionStoreWriteComputeProcessor
(String storeName, ReadOnlySchemaRepository schemaRepo, MergeRecordHelper mergeRecordHelper, boolean fastAvroEnabled) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
applyWriteCompute
(org.apache.avro.generic.GenericRecord currValue, int writerValueSchemaId, int readerValueSchemaId, ByteBuffer writeComputeBytes, int writerUpdateProtocolVersion, int readerUpdateProtocolVersion) Apply Update operation on the current value record.
-
Constructor Details
-
StoreWriteComputeProcessor
public StoreWriteComputeProcessor(@Nonnull String storeName, @Nonnull ReadOnlySchemaRepository schemaRepo, MergeRecordHelper mergeRecordHelper, boolean fastAvroEnabled)
-
-
Method Details
-
applyWriteCompute
public byte[] applyWriteCompute(org.apache.avro.generic.GenericRecord currValue, int writerValueSchemaId, int readerValueSchemaId, ByteBuffer writeComputeBytes, int writerUpdateProtocolVersion, int readerUpdateProtocolVersion) Apply Update operation on the current value record.- Parameters:
currValue
- value record that is currently stored on this Venice server. It is null when there is currently no value stored on this Venice server.writeComputeBytes
- serialized write-compute operation.writerValueSchemaId
- ID of the writer value schema.readerValueSchemaId
- ID of the reader value schema.writerUpdateProtocolVersion
- Update protocol version used to serialize Update payload bytes.readerUpdateProtocolVersion
- Update protocol version used to deserialize Update payload bytes.- Returns:
- Bytes of partially updated original value.
-