Class LeaderProducerCallback
java.lang.Object
com.linkedin.davinci.kafka.consumer.LeaderProducerCallback
- All Implemented Interfaces:
PubSubProducerCallback
,ChunkAwareCallback
- Direct Known Subclasses:
ActiveActiveProducerCallback
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final ChunkedValueManifestSerializer
protected ChunkedValueManifest
protected static final ByteBuffer
protected final LeaderFollowerStoreIngestionTask
protected final LeaderProducedRecordContext
protected ChunkedValueManifest
protected ChunkedValueManifest
-
Constructor Summary
ConstructorDescriptionLeaderProducerCallback
(LeaderFollowerStoreIngestionTask ingestionTask, PubSubMessage<KafkaKey, KafkaMessageEnvelope, Long> sourceConsumerRecord, PartitionConsumptionState partitionConsumptionState, LeaderProducedRecordContext leaderProducedRecordContext, int partition, String kafkaUrl, long beforeProcessingRecordTimestampNs) -
Method Summary
Modifier and TypeMethodDescriptionprotected Put
protected Put
protected Put
void
onCompletion
(PubSubProduceResult produceResult, Exception e) exception will be null if request was completed without an error.void
setChunkingInfo
(byte[] key, ByteBuffer[] valueChunks, ChunkedValueManifest chunkedValueManifest, ByteBuffer[] rmdChunks, ChunkedValueManifest chunkedRmdManifest, ChunkedValueManifest oldValueManifest, ChunkedValueManifest oldRmdManifest) For all PUT operations, the is guaranteed to be passed via this function, whether chunking is enabled or not, and whether the value is chunked or not.
-
Field Details
-
CHUNKED_VALUE_MANIFEST_SERIALIZER
-
EMPTY_BYTE_BUFFER
-
ingestionTask
-
leaderProducedRecordContext
-
chunkedRmdManifest
-
oldValueManifest
-
oldRmdManifest
-
-
Constructor Details
-
LeaderProducerCallback
public LeaderProducerCallback(LeaderFollowerStoreIngestionTask ingestionTask, PubSubMessage<KafkaKey, KafkaMessageEnvelope, Long> sourceConsumerRecord, PartitionConsumptionState partitionConsumptionState, LeaderProducedRecordContext leaderProducedRecordContext, int partition, String kafkaUrl, long beforeProcessingRecordTimestampNs)
-
-
Method Details
-
onCompletion
Description copied from interface:PubSubProducerCallback
exception will be null if request was completed without an error.- Specified by:
onCompletion
in interfacePubSubProducerCallback
-
setChunkingInfo
public void setChunkingInfo(byte[] key, ByteBuffer[] valueChunks, ChunkedValueManifest chunkedValueManifest, ByteBuffer[] rmdChunks, ChunkedValueManifest chunkedRmdManifest, ChunkedValueManifest oldValueManifest, ChunkedValueManifest oldRmdManifest) Description copied from interface:ChunkAwareCallback
For all PUT operations, the is guaranteed to be passed via this function, whether chunking is enabled or not, and whether the value is chunked or not. The other two parameters are null if the value is not chunked.- Specified by:
setChunkingInfo
in interfaceChunkAwareCallback
- Parameters:
key
- A byte[] corresponding to the top-level key written to Kafka, potentially including a chunking suffixvalueChunks
- An array ofByteBuffer
where the backing array has sufficient headroom to prepend Venice's headerchunkedValueManifest
- TheChunkedValueManifest
of the new chunked valuermdChunks
- An array ofByteBuffer
where the backing array has sufficient headroom to prepend Venice's headerchunkedRmdManifest
- TheChunkedValueManifest
of the new chunked RMDoldValueManifest
- TheChunkedValueManifest
of the previous chunked valueoldRmdManifest
- TheChunkedValueManifest
of the previous chunked RMD
-
instantiateValueChunkPut
-
instantiateRmdChunkPut
-
instantiateManifestPut
-
getPartitionConsumptionState
-
getSourceConsumerRecord
-
getIngestionTask
-