Enum Class VeniceSystemStoreType

java.lang.Object
java.lang.Enum<VeniceSystemStoreType>
com.linkedin.venice.common.VeniceSystemStoreType
All Implemented Interfaces:
Serializable, Comparable<VeniceSystemStoreType>, Constable

public enum VeniceSystemStoreType extends Enum<VeniceSystemStoreType>
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.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static VeniceSystemStoreType[] 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

      public static VeniceSystemStoreType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getPrefix

      public String getPrefix()
    • isStoreZkShared

      public boolean isStoreZkShared()
    • getKeySchema

      public String getKeySchema()
    • getValueSchema

      public String getValueSchema()
    • getZkSharedStoreName

      public String getZkSharedStoreName()
    • getZkSharedStoreNameInCluster

      public String getZkSharedStoreNameInCluster(String clusterName)
    • isNewMedataRepositoryAdopted

      public boolean isNewMedataRepositoryAdopted()
    • getSystemStoreName

      public String getSystemStoreName(String regularStoreName)
      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

      public boolean isSystemStore(String storeName)
      This function is used to check whether the passed store name belongs to the current system store type.
      Parameters:
      storeName -
      Returns:
    • extractRegularStoreName

      public String extractRegularStoreName(String systemStoreName)
      This function is to extract the regular store name from the system store name.
      Parameters:
      systemStoreName -
      Returns:
    • getClientAccessMethod

      public Method getClientAccessMethod()
    • generateSystemStoreAclBinding

      public AclBinding generateSystemStoreAclBinding(AclBinding regularStoreAclBinding)
      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

      public 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. This method transform a kafka topic AclBinding to a system store AclBinding.
      Parameters:
      systemStoreTopicAclBinding - AclBinding for the system store's kafka topic.
      Returns:
    • getSystemStoreType

      public static VeniceSystemStoreType getSystemStoreType(String storeName)
    • getEnabledSystemStoreTypes

      public static List<VeniceSystemStoreType> getEnabledSystemStoreTypes(Store regularStore)
      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

      public static String extractUserStoreName(String storeName)
      Extract the corresponding user store name from the given store name if it happens to be a system store.