Package com.linkedin.davinci
Class DaVinciBackend
java.lang.Object
com.linkedin.davinci.DaVinciBackend
- All Implemented Interfaces:
Closeable,AutoCloseable
Core backend service that powers all
DaVinciClient client instances with
shared infrastructure for storage, ingestion, and metadata management.
This backend is designed as a shared resource managed through a ReferenceCounted
pattern in AvroGenericDaVinciClient. Multiple DaVinci clients share the
same ingestion services and metadata repositories for resource efficiency.
DaVinciBackend tracks different client types (regular vs version-specific) to prevent collisions due to
the shared behavior of this class. Regular clients participate in version swaps while version-specific
clients subscribe to a fixed version and ignore version swap events.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDaVinciBackend(ClientConfig clientConfig, VeniceConfigLoader configLoader, Optional<Set<String>> managedClients, ICProvider icProvider, Optional<ObjectCacheConfig> cacheConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStoreBackend(String storeName, StoreBackend storeBackend) voidclose()protected voiddeleteStore(String storeName) final IngestionBackendgetInternalRecordTransformerConfig(String storeName) getStoreClientType(String storeName) getStoreOrThrow(String storeName) getVersionSpecificStoreVersion(String storeName) protected voidhandleStoreChanged(StoreBackend storeBackend) booleanfinal booleanvoidregisterRecordTransformerConfig(String storeName, DaVinciRecordTransformerConfig recordTransformerConfig) voidregisterStoreClient(String storeName, Integer storeVersion) Registers a store client and enforces client type exclusivity per store.protected voidreportPushStatus(String kafkaTopic, int partition, ExecutionStatus status) protected voidreportPushStatus(String kafkaTopic, int partition, ExecutionStatus status, Optional<String> incrementalPushVersion) voidsetConfigLoader(VeniceConfigLoader configLoader) voidsetStorageService(StorageService storageService) voidsetStoreRepository(SubscriptionBasedReadOnlyStoreRepository storeRepository) voidunregisterStoreClient(String storeName, Integer storeVersion) voidverifyCacheConfigEquality(ObjectCacheConfig newObjectCacheConfig, String storeName)
-
Constructor Details
-
DaVinciBackend
public DaVinciBackend(ClientConfig clientConfig, VeniceConfigLoader configLoader, Optional<Set<String>> managedClients, ICProvider icProvider, Optional<ObjectCacheConfig> cacheConfig)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getStoreOrThrow
-
getStoreRepository
-
getObjectCache
-
getSchemaRepository
-
getIngestionBackend
-
verifyCacheConfigEquality
public void verifyCacheConfigEquality(@Nullable ObjectCacheConfig newObjectCacheConfig, String storeName) -
getCompressorFactory
-
reportPushStatus
-
reportPushStatus
protected void reportPushStatus(String kafkaTopic, int partition, ExecutionStatus status, Optional<String> incrementalPushVersion) -
deleteStore
-
isIsolatedIngestion
public final boolean isIsolatedIngestion() -
handleStoreChanged
-
registerStoreClient
Registers a store client and enforces client type exclusivity per store. Prevents mixing regular and version-specific clients for the same store.- Parameters:
storeName- the name of the store to register a client forstoreVersion- the target version for version-specific clients, or null for regular clients- Throws:
VeniceClientException- if there is a client type conflict or multiple version-specific clients target different versions of the same store
-
unregisterStoreClient
-
getStoreClientType
-
getVersionSpecificStoreVersion
-
setStoreRepository
-
setStorageService
-
setConfigLoader
-
addStoreBackend
-
hasCurrentVersionBootstrapping
public boolean hasCurrentVersionBootstrapping() -
registerRecordTransformerConfig
public void registerRecordTransformerConfig(String storeName, DaVinciRecordTransformerConfig recordTransformerConfig) -
getInternalRecordTransformerConfig
-