Class LeaderProducerCallback
java.lang.Object
com.linkedin.davinci.kafka.consumer.LeaderProducerCallback
- All Implemented Interfaces:
PubSubProducerCallback,ChunkAwareCallback
- Direct Known Subclasses:
ActiveActiveProducerCallback
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ChunkedValueManifestSerializerprotected ChunkedValueManifestprotected static final ByteBufferprotected final LeaderFollowerStoreIngestionTaskprotected final LeaderProducedRecordContextprotected ChunkedValueManifestprotected ChunkedValueManifest -
Constructor Summary
ConstructorsConstructorDescriptionLeaderProducerCallback(LeaderFollowerStoreIngestionTask ingestionTask, DefaultPubSubMessage sourceConsumerRecord, PartitionConsumptionState partitionConsumptionState, LeaderProducedRecordContext leaderProducedRecordContext, int partition, String kafkaUrl, long beforeProcessingRecordTimestampNs) -
Method Summary
Modifier and TypeMethodDescriptionprotected Putprotected Putprotected PutvoidonCompletion(PubSubProduceResult produceResult, Exception e) exception will be null if request was completed without an error.voidsetChunkingInfo(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.voidsetOnCompletionFunction(Consumer<PubSubProduceResult> onCompletionFunction) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.pubsub.api.PubSubProducerCallback
setInternalCallback
-
Field Details
-
CHUNKED_VALUE_MANIFEST_SERIALIZER
-
EMPTY_BYTE_BUFFER
-
ingestionTask
-
leaderProducedRecordContext
-
chunkedRmdManifest
-
oldValueManifest
-
oldRmdManifest
-
-
Constructor Details
-
LeaderProducerCallback
public LeaderProducerCallback(LeaderFollowerStoreIngestionTask ingestionTask, DefaultPubSubMessage sourceConsumerRecord, PartitionConsumptionState partitionConsumptionState, LeaderProducedRecordContext leaderProducedRecordContext, int partition, String kafkaUrl, long beforeProcessingRecordTimestampNs)
-
-
Method Details
-
onCompletion
Description copied from interface:PubSubProducerCallbackexception will be null if request was completed without an error.- Specified by:
onCompletionin interfacePubSubProducerCallback
-
setChunkingInfo
public void setChunkingInfo(byte[] key, ByteBuffer[] valueChunks, ChunkedValueManifest chunkedValueManifest, ByteBuffer[] rmdChunks, ChunkedValueManifest chunkedRmdManifest, ChunkedValueManifest oldValueManifest, ChunkedValueManifest oldRmdManifest) Description copied from interface:ChunkAwareCallbackFor 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:
setChunkingInfoin interfaceChunkAwareCallback- Parameters:
key- A byte[] corresponding to the top-level key written to Kafka, potentially including a chunking suffixvalueChunks- An array ofByteBufferwhere the backing array has sufficient headroom to prepend Venice's headerchunkedValueManifest- TheChunkedValueManifestof the new chunked valuermdChunks- An array ofByteBufferwhere the backing array has sufficient headroom to prepend Venice's headerchunkedRmdManifest- TheChunkedValueManifestof the new chunked RMDoldValueManifest- TheChunkedValueManifestof the previous chunked valueoldRmdManifest- TheChunkedValueManifestof the previous chunked RMD
-
instantiateValueChunkPut
-
instantiateRmdChunkPut
-
instantiateManifestPut
-
setOnCompletionFunction
-
getPartitionConsumptionState
-
getSourceConsumerRecord
-
getIngestionTask
-