Package com.linkedin.davinci.ingestion
Class DefaultIngestionBackend
java.lang.Object
com.linkedin.davinci.ingestion.DefaultIngestionBackend
- All Implemented Interfaces:
IngestionBackend,Closeable,AutoCloseable
The default ingestion backend implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultIngestionBackend(StorageMetadataService storageMetadataService, KafkaStoreIngestionService storeIngestionService, StorageService storageService, VeniceServerConfig serverConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIngestionNotifier(VeniceNotifier ingestionListener) voidclose()dropStoragePartitionGracefully(VeniceStoreVersionConfig storeConfig, int partition, int timeoutInSeconds, boolean removeEmptyStorageEngine, String replicaId) This method stops to subscribe the specified topic partition and delete partition data from storage.booleanCheck whether there are any current version bootstrapping or not.voidkillConsumptionTask(String topicName) voidremoveStorageEngine(String topicName) voidsetStorageEngineReference(String topicName, AtomicReference<StorageEngine> storageEngineReference) voidshutdownIngestionTask(String topicName) voidstartConsumption(VeniceStoreVersionConfig storeConfig, int partition, Optional<PubSubPosition> pubSubPosition, String replicaId) stopConsumption(VeniceStoreVersionConfig storeConfig, int partition, String replicaId) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.davinci.ingestion.IngestionBackend
dropStoragePartitionGracefully
-
Constructor Details
-
DefaultIngestionBackend
public DefaultIngestionBackend(StorageMetadataService storageMetadataService, KafkaStoreIngestionService storeIngestionService, StorageService storageService, VeniceServerConfig serverConfig)
-
-
Method Details
-
startConsumption
public void startConsumption(VeniceStoreVersionConfig storeConfig, int partition, Optional<PubSubPosition> pubSubPosition, String replicaId) - Specified by:
startConsumptionin interfaceIngestionBackend
-
stopConsumption
public CompletableFuture<Void> stopConsumption(VeniceStoreVersionConfig storeConfig, int partition, String replicaId) - Specified by:
stopConsumptionin interfaceIngestionBackend
-
killConsumptionTask
- Specified by:
killConsumptionTaskin interfaceIngestionBackend
-
shutdownIngestionTask
- Specified by:
shutdownIngestionTaskin interfaceIngestionBackend
-
removeStorageEngine
- Specified by:
removeStorageEnginein interfaceIngestionBackend
-
dropStoragePartitionGracefully
public CompletableFuture<Void> dropStoragePartitionGracefully(VeniceStoreVersionConfig storeConfig, int partition, int timeoutInSeconds, boolean removeEmptyStorageEngine, String replicaId) Description copied from interface:IngestionBackendThis method stops to subscribe the specified topic partition and delete partition data from storage.- Specified by:
dropStoragePartitionGracefullyin interfaceIngestionBackend- Parameters:
storeConfig- Store version configpartition- Partition number to be dropped in the store version.timeoutInSeconds- Number of seconds to wait before timeout.removeEmptyStorageEngine- Whether to drop storage engine when dropping the last partition.replicaId- The replica identifier for this partition.- Returns:
- a future for the drop partition action.
-
addIngestionNotifier
- Specified by:
addIngestionNotifierin interfaceIngestionBackend
-
setStorageEngineReference
public void setStorageEngineReference(String topicName, AtomicReference<StorageEngine> storageEngineReference) - Specified by:
setStorageEngineReferencein interfaceIngestionBackend
-
hasCurrentVersionBootstrapping
public boolean hasCurrentVersionBootstrapping()Description copied from interface:IngestionBackendCheck whether there are any current version bootstrapping or not.- Specified by:
hasCurrentVersionBootstrappingin interfaceIngestionBackend
-
getStoreIngestionService
- Specified by:
getStoreIngestionServicein interfaceIngestionBackend
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-