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 SummaryConstructorsConstructorDescriptionStorePartitionDataReceiver(StoreIngestionTask storeIngestionTask, PubSubTopicPartition topicPartition, String kafkaUrl, int kafkaClusterId) 
- 
Method SummaryModifier 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- 
StorePartitionDataReceiverpublic StorePartitionDataReceiver(StoreIngestionTask storeIngestionTask, PubSubTopicPartition topicPartition, String kafkaUrl, int kafkaClusterId) 
 
- 
- 
Method Details- 
writeDescription 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 interface- ConsumedDataReceiver<List<DefaultPubSubMessage>>
- Parameters:
- consumedData- Consumed data.
- Throws:
- Exception
 
- 
destinationIdentifierDescription 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 interface- ConsumedDataReceiver<List<DefaultPubSubMessage>>
- Returns:
- an identifier of where the data is going.
 
- 
notifyOfTopicDeletion- Specified by:
- notifyOfTopicDeletionin interface- ConsumedDataReceiver<List<DefaultPubSubMessage>>
 
- 
receivedRecordsCountpublic long receivedRecordsCount()- Returns:
- Number of data records put in the receiver, for testing purpose.
 
- 
toString
 
-