Package com.linkedin.venice.common
Enum Class VeniceSystemStoreType
- All Implemented Interfaces:
Serializable
,Comparable<VeniceSystemStoreType>
,Constable
Enum used to differentiate the different types of Venice system stores when access their metadata. Currently only
the store metadata system stores are treated differently because they are sharing metadata in Zookeeper. Future system
store types should be added here especially if they also would like to share metadata in Zookeeper.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractRegularStoreName
(String systemStoreName) This function is to extract the regular store name from the system store name.static String
extractUserStoreName
(String storeName) Extract the corresponding user store name from the given store name if it happens to be a system store.generateSystemStoreAclBinding
(AclBinding regularStoreAclBinding) Generate the corresponding AclBinding for a given Venice system store type based on the corresponding Venice store's Read acl.static List<VeniceSystemStoreType>
getEnabledSystemStoreTypes
(Store regularStore) Get a list of enabled Venice system store types based on the given regular Venice Store object.static AclBinding
getSystemStoreAclFromTopicAcl
(AclBinding systemStoreTopicAclBinding) AclBinding of system store resource retrieved from authorizer service will not have the system store specific Method types and instead will either be READ or WRITE.getSystemStoreName
(String regularStoreName) This function is to compose a system store name according to the current system store type and the regular store name.static VeniceSystemStoreType
getSystemStoreType
(String storeName) getZkSharedStoreNameInCluster
(String clusterName) boolean
boolean
boolean
isSystemStore
(String storeName) This function is used to check whether the passed store name belongs to the current system store type.static VeniceSystemStoreType
Returns the enum constant of this class with the specified name.static VeniceSystemStoreType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DAVINCI_PUSH_STATUS_STORE
-
META_STORE
-
BATCH_JOB_HEARTBEAT_STORE
-
-
Field Details
-
VALUES
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getPrefix
-
getKeySchema
-
getValueSchema
-
isNewMedataRepositoryAdopted
public boolean isNewMedataRepositoryAdopted() -
getSystemStoreName
This function is to compose a system store name according to the current system store type and the regular store name.- Parameters:
regularStoreName
-- Returns:
-
isSystemStore
This function is used to check whether the passed store name belongs to the current system store type.- Parameters:
storeName
-- Returns:
-
extractRegularStoreName
This function is to extract the regular store name from the system store name.- Parameters:
systemStoreName
-- Returns:
-
getClientAccessMethod
-
generateSystemStoreAclBinding
Generate the corresponding AclBinding for a given Venice system store type based on the corresponding Venice store's Read acl. i.e. all principals that are allowed to read a Venice store is allowed to read or write to its corresponding Venice system store topics.- Parameters:
regularStoreAclBinding
- of the associated Venice store.- Returns:
- AclBinding to get read or write access for the corresponding Venice system store.
-
getSystemStoreAclFromTopicAcl
AclBinding of system store resource retrieved from authorizer service will not have the system store specific Method types and instead will either be READ or WRITE. This method transform a kafka topic AclBinding to a system store AclBinding.- Parameters:
systemStoreTopicAclBinding
- AclBinding for the system store's kafka topic.- Returns:
-
getSystemStoreType
-
getEnabledSystemStoreTypes
Get a list of enabled Venice system store types based on the given regular Venice Store object.- Parameters:
regularStore
- object to generate a list of enabled system store types with.- Returns:
- a list of enabled VeniceSystemStoreType
-
extractUserStoreName
Extract the corresponding user store name from the given store name if it happens to be a system store.
-