Class StorePartitionDataReceiver
java.lang.Object
com.linkedin.davinci.kafka.consumer.StorePartitionDataReceiver
- All Implemented Interfaces:
ConsumedDataReceiver<List<DefaultPubSubMessage>>
public class StorePartitionDataReceiver
extends Object
implements ConsumedDataReceiver<List<DefaultPubSubMessage>>
-
Constructor Summary
ConstructorsConstructorDescriptionStorePartitionDataReceiver(StoreIngestionTask storeIngestionTask, PubSubTopicPartition topicPartition, String kafkaUrl, int kafkaClusterId) -
Method Summary
Modifier and TypeMethodDescriptionN.B.: Used for defensive coding.voidnotifyOfTopicDeletion(String topicName) longtoString()voidwrite(List<DefaultPubSubMessage> consumedData) This method accepts data consumed from a queue and it should be non-blocking.
-
Constructor Details
-
StorePartitionDataReceiver
public StorePartitionDataReceiver(StoreIngestionTask storeIngestionTask, PubSubTopicPartition topicPartition, String kafkaUrl, int kafkaClusterId)
-
-
Method Details
-
write
Description copied from interface:ConsumedDataReceiverThis method accepts data consumed from a queue and it should be non-blocking. This method may throw an exception if write is not successful. No exception being thrown means write is successful.- Specified by:
writein interfaceConsumedDataReceiver<List<DefaultPubSubMessage>>- Parameters:
consumedData- Consumed data.- Throws:
Exception
-
destinationIdentifier
Description copied from interface:ConsumedDataReceiverN.B.: Used for defensive coding. Today, this is exclusively used to return the version-topic name. If this is to be expanded to other usages in the future, we should consider carefully if it needs refactoring.- Specified by:
destinationIdentifierin interfaceConsumedDataReceiver<List<DefaultPubSubMessage>>- Returns:
- an identifier of where the data is going.
-
notifyOfTopicDeletion
- Specified by:
notifyOfTopicDeletionin interfaceConsumedDataReceiver<List<DefaultPubSubMessage>>
-
receivedRecordsCount
public long receivedRecordsCount()- Returns:
- Number of data records put in the receiver, for testing purpose.
-
toString
-