Package com.linkedin.davinci.repository
Class DaVinciClientMetaStoreBasedRepository
- java.lang.Object
-
- com.linkedin.davinci.repository.NativeMetadataRepository
-
- com.linkedin.davinci.repository.DaVinciClientMetaStoreBasedRepository
-
- All Implemented Interfaces:
ClusterInfoProvider
,ReadOnlySchemaRepository
,ReadOnlyStoreRepository
,SubscriptionBasedReadOnlyStoreRepository
,VeniceResource
@Deprecated public class DaVinciClientMetaStoreBasedRepository extends NativeMetadataRepository
Deprecated.This implementation uses DaVinci client backed meta system store to provide data to theNativeMetadataRepository
. The data is then cached and served from there. Deprecated due to cyclic dependency during initialization.
-
-
Field Summary
-
Fields inherited from class com.linkedin.davinci.repository.NativeMetadataRepository
clientConfig, subscribedStoreMap, THIN_CLIENT_RETRY_BACKOFF_MS, THIN_CLIENT_RETRY_COUNT
-
-
Constructor Summary
Constructors Constructor Description DaVinciClientMetaStoreBasedRepository(ClientConfig clientConfig, VeniceProperties backendConfig, CachingDaVinciClientFactory daVinciClientFactory, SchemaReader metaStoreSchemaReader)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.TODO: we may need to rename this function to be 'close' since this resource should not used any more after calling this function.SchemaEntry
getKeySchema(java.lang.String storeName)
Deprecated.This function is used to retrieve key schema for the given store.protected SystemStore
getMetaStore(java.lang.String metaStoreName)
Deprecated.protected SchemaData
getSchemaDataFromSystemStore(java.lang.String storeName)
Deprecated.Store
getStore(java.lang.String storeName)
Deprecated.Get one store by given name from repository.protected StoreConfig
getStoreConfigFromSystemStore(java.lang.String storeName)
Deprecated.protected Store
getStoreFromSystemStore(java.lang.String storeName, java.lang.String clusterName)
Deprecated.protected StoreMetaValue
getStoreMetaValue(java.lang.String storeName, StoreMetaKey key)
Deprecated.Store
getStoreOrThrow(java.lang.String storeName)
Deprecated.SchemaEntry
getSupersetOrLatestValueSchema(java.lang.String storeName)
Deprecated.Get the most recent value schema or superset value schema if one exists.SchemaEntry
getSupersetSchema(java.lang.String storeName)
Deprecated.Get the superset value schema for a given store.int
getValueSchemaId(java.lang.String storeName, java.lang.String valueSchemaStr)
Deprecated.This function is used to retrieve value schema id for the given store and schema.protected SchemaEntry
getValueSchemaInternally(java.lang.String storeName, int id)
Deprecated.java.util.Collection<SchemaEntry>
getValueSchemas(java.lang.String storeName)
Deprecated.This function is used to retrieve all the value schemas for the given store.boolean
hasStore(java.lang.String storeName)
Deprecated.Whether the store exists or not.Store
refreshOneStore(java.lang.String storeName)
Deprecated.Selective refresh operation which fetches one store from ZKprotected Store
removeStore(java.lang.String storeName)
Deprecated.void
subscribe(java.lang.String storeName)
Deprecated.-
Methods inherited from class com.linkedin.davinci.repository.NativeMetadataRepository
getAllStores, getAndCacheSchemaDataFromSystemStore, getAndSetStoreConfigFromSystemStore, getBatchGetLimit, getDerivedSchema, getDerivedSchemaId, getDerivedSchemas, getInstance, getInstance, getLatestDerivedSchema, getReplicationMetadataSchema, getReplicationMetadataSchemas, getSchemaDataFromMetaSystemStore, getStoreConfigFromMetaSystemStore, getTotalStoreReadQuota, getValueSchema, getVeniceCluster, hasValueSchema, isReadComputationEnabled, notifyStoreChanged, notifyStoreCreated, notifyStoreDeleted, putStore, refresh, registerStoreDataChangedListener, removeStoreSchema, start, unregisterStoreDataChangedListener, unsubscribe
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linkedin.venice.meta.ReadOnlySchemaRepository
getLatestDerivedSchema
-
Methods inherited from interface com.linkedin.venice.meta.ReadOnlyStoreRepository
waitVersion, waitVersion
-
-
-
-
Constructor Detail
-
DaVinciClientMetaStoreBasedRepository
public DaVinciClientMetaStoreBasedRepository(ClientConfig clientConfig, VeniceProperties backendConfig, CachingDaVinciClientFactory daVinciClientFactory, SchemaReader metaStoreSchemaReader)
Deprecated.
-
-
Method Detail
-
removeStore
protected Store removeStore(java.lang.String storeName)
Deprecated.- Overrides:
removeStore
in classNativeMetadataRepository
-
getStoreMetaValue
protected StoreMetaValue getStoreMetaValue(java.lang.String storeName, StoreMetaKey key)
Deprecated.- Specified by:
getStoreMetaValue
in classNativeMetadataRepository
-
getKeySchema
public SchemaEntry getKeySchema(java.lang.String storeName)
Deprecated.Description copied from class:NativeMetadataRepository
This function is used to retrieve key schema for the given store. If key schema for the given store doesn't exist, will return null; Otherwise, it will return the key schema;- Specified by:
getKeySchema
in interfaceReadOnlySchemaRepository
- Overrides:
getKeySchema
in classNativeMetadataRepository
- Returns:
- null, if key schema for the given store doesn't exist; key schema entry, otherwise;
-
getValueSchemaInternally
protected SchemaEntry getValueSchemaInternally(java.lang.String storeName, int id)
Deprecated.- Overrides:
getValueSchemaInternally
in classNativeMetadataRepository
-
getValueSchemaId
public int getValueSchemaId(java.lang.String storeName, java.lang.String valueSchemaStr)
Deprecated.Description copied from class:NativeMetadataRepository
This function is used to retrieve value schema id for the given store and schema.- Specified by:
getValueSchemaId
in interfaceReadOnlySchemaRepository
- Overrides:
getValueSchemaId
in classNativeMetadataRepository
- Returns:
SchemaData.INVALID_VALUE_SCHEMA_ID
, if the schema doesn't exist in the given store; schema id (int), if the schema exists in the given store
-
getValueSchemas
public java.util.Collection<SchemaEntry> getValueSchemas(java.lang.String storeName)
Deprecated.Description copied from class:NativeMetadataRepository
This function is used to retrieve all the value schemas for the given store.- Specified by:
getValueSchemas
in interfaceReadOnlySchemaRepository
- Overrides:
getValueSchemas
in classNativeMetadataRepository
-
getSupersetOrLatestValueSchema
public SchemaEntry getSupersetOrLatestValueSchema(java.lang.String storeName)
Deprecated.Description copied from interface:ReadOnlySchemaRepository
Get the most recent value schema or superset value schema if one exists.- Specified by:
getSupersetOrLatestValueSchema
in interfaceReadOnlySchemaRepository
- Overrides:
getSupersetOrLatestValueSchema
in classNativeMetadataRepository
-
getSupersetSchema
public SchemaEntry getSupersetSchema(java.lang.String storeName)
Deprecated.Description copied from interface:ReadOnlySchemaRepository
Get the superset value schema for a given store. Each store has at most one active superset schema. Specifically a store must have some features enabled (e.g. read compute, write compute) to have a superset value schema which evolves as new value schemas are added.- Specified by:
getSupersetSchema
in interfaceReadOnlySchemaRepository
- Overrides:
getSupersetSchema
in classNativeMetadataRepository
- Returns:
- Superset value schema or
null
if store {@param storeName} does not have any superset value schema.
-
subscribe
public void subscribe(java.lang.String storeName) throws java.lang.InterruptedException
Deprecated.- Specified by:
subscribe
in interfaceSubscriptionBasedReadOnlyStoreRepository
- Overrides:
subscribe
in classNativeMetadataRepository
- Throws:
java.lang.InterruptedException
-
refreshOneStore
public Store refreshOneStore(java.lang.String storeName)
Deprecated.Description copied from interface:ReadOnlyStoreRepository
Selective refresh operation which fetches one store from ZK- Specified by:
refreshOneStore
in interfaceReadOnlyStoreRepository
- Overrides:
refreshOneStore
in classNativeMetadataRepository
- Parameters:
storeName
- store name- Returns:
- the newly refreshed store
-
getStore
public Store getStore(java.lang.String storeName)
Deprecated.Description copied from interface:ReadOnlyStoreRepository
Get one store by given name from repository.- Specified by:
getStore
in interfaceReadOnlyStoreRepository
- Overrides:
getStore
in classNativeMetadataRepository
- Parameters:
storeName
- name of wanted store.- Returns:
- Store for given name.
-
getStoreOrThrow
public Store getStoreOrThrow(java.lang.String storeName) throws VeniceNoStoreException
Deprecated.- Specified by:
getStoreOrThrow
in interfaceReadOnlyStoreRepository
- Overrides:
getStoreOrThrow
in classNativeMetadataRepository
- Throws:
VeniceNoStoreException
-
hasStore
public boolean hasStore(java.lang.String storeName)
Deprecated.Description copied from interface:ReadOnlyStoreRepository
Whether the store exists or not.- Specified by:
hasStore
in interfaceReadOnlyStoreRepository
- Overrides:
hasStore
in classNativeMetadataRepository
- Parameters:
storeName
- store name- Returns:
-
clear
public void clear()
Deprecated.Description copied from class:NativeMetadataRepository
TODO: we may need to rename this function to be 'close' since this resource should not used any more after calling this function.- Specified by:
clear
in interfaceVeniceResource
- Overrides:
clear
in classNativeMetadataRepository
-
getStoreConfigFromSystemStore
protected StoreConfig getStoreConfigFromSystemStore(java.lang.String storeName)
Deprecated.- Specified by:
getStoreConfigFromSystemStore
in classNativeMetadataRepository
-
getStoreFromSystemStore
protected Store getStoreFromSystemStore(java.lang.String storeName, java.lang.String clusterName)
Deprecated.- Specified by:
getStoreFromSystemStore
in classNativeMetadataRepository
-
getMetaStore
protected SystemStore getMetaStore(java.lang.String metaStoreName)
Deprecated.
-
getSchemaDataFromSystemStore
protected SchemaData getSchemaDataFromSystemStore(java.lang.String storeName)
Deprecated.- Specified by:
getSchemaDataFromSystemStore
in classNativeMetadataRepository
-
-