Interface StoreIngestionService
-
- All Superinterfaces:
IngestionMetadataRetriever
- All Known Implementing Classes:
KafkaStoreIngestionService
public interface StoreIngestionService extends IngestionMetadataRetriever
An interface for Store Ingestion Service for Venice.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddIngestionNotifier(VeniceNotifier notifier)Adds Notifier to get Notifications for get various status of the consumption tasks like start, completed, progress and error states.booleancontainsRunningConsumption(VeniceStoreVersionConfig veniceStore)Check whether there is a running consumption task for given store.booleancontainsRunningConsumption(java.lang.String topic)Check whether there is a running consumption task for given store version topic.voiddemoteToStandby(VeniceStoreVersionConfig veniceStoreVersionConfig, int partitionId, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker)AggVersionedIngestionStatsgetAggVersionedIngestionStats()Get AggVersionedStorageIngestionStatsjava.util.Set<java.lang.String>getIngestingTopicsWithVersionStatusNotOnline()Get topic names that are currently maintained by the ingestion service with corresponding version status not in an online state.StoreIngestionTaskgetStoreIngestionTask(java.lang.String topic)VeniceConfigLoadergetVeniceConfigLoader()booleanisPartitionConsuming(java.lang.String topic, int partitionId)Check whether the specified partition is still being consumedbooleankillConsumptionTask(java.lang.String topicName)Kill all of running consumptions of given store.voidpromoteToLeader(VeniceStoreVersionConfig veniceStoreVersionConfig, int partitionId, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker)voidrecordIngestionFailure(java.lang.String storeName)voidreplaceAndAddTestNotifier(VeniceNotifier notifier)voidstartConsumption(VeniceStoreVersionConfig veniceStore, int partitionId)Starts consuming messages from Kafka Partition corresponding to Venice Partition.java.util.concurrent.CompletableFuture<java.lang.Void>stopConsumption(VeniceStoreVersionConfig veniceStore, int partitionId)Stops consuming messages from Kafka Partition corresponding to Venice Partition.voidstopConsumptionAndWait(VeniceStoreVersionConfig veniceStore, int partitionId, int sleepSeconds, int numRetries, boolean whetherToResetOffset)Stops consuming messages from Kafka Partition corresponding to Venice Partition and wait up to (sleepSeconds * numRetires) to make sure partition consumption is stopped.-
Methods inherited from interface com.linkedin.davinci.storage.IngestionMetadataRetriever
getConsumptionSnapshots, getStoreVersionCompressionDictionary, getTopicPartitionIngestionContext
-
-
-
-
Method Detail
-
startConsumption
void startConsumption(VeniceStoreVersionConfig veniceStore, int partitionId)
Starts consuming messages from Kafka Partition corresponding to Venice Partition.- Parameters:
veniceStore- Venice Store for the partition.partitionId- Venice partition's id.
-
stopConsumption
java.util.concurrent.CompletableFuture<java.lang.Void> stopConsumption(VeniceStoreVersionConfig veniceStore, int partitionId)
Stops consuming messages from Kafka Partition corresponding to Venice Partition.- Parameters:
veniceStore- Venice Store for the partition.partitionId- Venice partition's id.
-
stopConsumptionAndWait
void stopConsumptionAndWait(VeniceStoreVersionConfig veniceStore, int partitionId, int sleepSeconds, int numRetries, boolean whetherToResetOffset)
Stops consuming messages from Kafka Partition corresponding to Venice Partition and wait up to (sleepSeconds * numRetires) to make sure partition consumption is stopped.
-
killConsumptionTask
boolean killConsumptionTask(java.lang.String topicName)
Kill all of running consumptions of given store.- Parameters:
topicName- Venice topic (store and version number) for the corresponding consumer task that needs to be killed.
-
promoteToLeader
void promoteToLeader(VeniceStoreVersionConfig veniceStoreVersionConfig, int partitionId, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker)
-
demoteToStandby
void demoteToStandby(VeniceStoreVersionConfig veniceStoreVersionConfig, int partitionId, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker)
-
addIngestionNotifier
void addIngestionNotifier(VeniceNotifier notifier)
Adds Notifier to get Notifications for get various status of the consumption tasks like start, completed, progress and error states. Multiple Notifiers can be added for the same consumption tasks and all of them will be notified in order.- Parameters:
notifier-
-
replaceAndAddTestNotifier
void replaceAndAddTestNotifier(VeniceNotifier notifier)
-
containsRunningConsumption
boolean containsRunningConsumption(VeniceStoreVersionConfig veniceStore)
Check whether there is a running consumption task for given store.
-
containsRunningConsumption
boolean containsRunningConsumption(java.lang.String topic)
Check whether there is a running consumption task for given store version topic.
-
isPartitionConsuming
boolean isPartitionConsuming(java.lang.String topic, int partitionId)Check whether the specified partition is still being consumed
-
getIngestingTopicsWithVersionStatusNotOnline
java.util.Set<java.lang.String> getIngestingTopicsWithVersionStatusNotOnline()
Get topic names that are currently maintained by the ingestion service with corresponding version status not in an online state. Topics with invalid store or version number are also included in the returned list.- Returns:
- a
Setof topic names.
-
recordIngestionFailure
void recordIngestionFailure(java.lang.String storeName)
-
getAggVersionedIngestionStats
AggVersionedIngestionStats getAggVersionedIngestionStats()
Get AggVersionedStorageIngestionStats- Returns:
- an instance of
AggVersionedIngestionStats
-
getStoreIngestionTask
StoreIngestionTask getStoreIngestionTask(java.lang.String topic)
-
getVeniceConfigLoader
VeniceConfigLoader getVeniceConfigLoader()
-
-