Class HelixInstanceConfigRepository

java.lang.Object
com.linkedin.venice.helix.HelixInstanceConfigRepository
All Implemented Interfaces:
VeniceResource, org.apache.helix.api.listeners.InstanceConfigChangeListener

public class HelixInstanceConfigRepository extends Object implements VeniceResource, org.apache.helix.api.listeners.InstanceConfigChangeListener
This repository is used to store the instance config per instance. So far it only stores group/zone info, and we could add more if necessary in the future.
  • Field Details

  • Constructor Details

    • HelixInstanceConfigRepository

      public HelixInstanceConfigRepository(SafeHelixManager manager, boolean useGroupFieldInDomain)
  • Method Details

    • refresh

      public void refresh()
      Specified by:
      refresh in interface VeniceResource
    • clear

      public void clear()
      Specified by:
      clear in interface VeniceResource
    • getInstanceGroupId

      public int getInstanceGroupId(String instanceId)
    • getInstanceGroupIdMapping

      public Map<String,Integer> getInstanceGroupIdMapping()
    • getGroupCount

      public int getGroupCount()
    • onInstanceConfigChange

      public void onInstanceConfigChange(List<org.apache.helix.model.InstanceConfig> instanceConfigs, org.apache.helix.NotificationContext context)
      This function will assign a unique group id per group. If there is no group defined for some instances, this function will use empty string as the default.
      Specified by:
      onInstanceConfigChange in interface org.apache.helix.api.listeners.InstanceConfigChangeListener