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 TypeMethodDescriptionvoid
addStoreBackend
(String storeName, StoreBackend storeBackend) void
close()
protected void
deleteStore
(String storeName) final IngestionBackend
getInternalRecordTransformerConfig
(String storeName) getStoreClientType
(String storeName) getStoreOrThrow
(String storeName) getVersionSpecificStoreVersion
(String storeName) protected void
handleStoreChanged
(StoreBackend storeBackend) boolean
protected final boolean
void
registerRecordTransformerConfig
(String storeName, DaVinciRecordTransformerConfig recordTransformerConfig) void
registerStoreClient
(String storeName, Integer storeVersion) Registers a store client and enforces client type exclusivity per store.protected void
reportPushStatus
(String kafkaTopic, int partition, ExecutionStatus status) protected void
reportPushStatus
(String kafkaTopic, int partition, ExecutionStatus status, Optional<String> incrementalPushVersion) void
setConfigLoader
(VeniceConfigLoader configLoader) void
setStorageService
(StorageService storageService) void
setStoreRepository
(SubscriptionBasedReadOnlyStoreRepository storeRepository) void
unregisterStoreClient
(String storeName, Integer storeVersion) void
verifyCacheConfigEquality
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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
protected 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
-