Package com.linkedin.venice.helix
Class HelixInstanceConfigRepository
java.lang.Object
com.linkedin.venice.helix.HelixInstanceConfigRepository
- All Implemented Interfaces:
VeniceResource,org.apache.helix.api.listeners.ClusterConfigChangeListener,org.apache.helix.api.listeners.InstanceConfigChangeListener
public class HelixInstanceConfigRepository
extends Object
implements VeniceResource, org.apache.helix.api.listeners.InstanceConfigChangeListener, org.apache.helix.api.listeners.ClusterConfigChangeListener
This repository is used to store the instance config per instance.
So far it only stores the fault zone type info, and we could add more if necessary in the future.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intintgetInstanceGroupId(String instanceId) voidonClusterConfigChange(org.apache.helix.model.ClusterConfig clusterConfig, org.apache.helix.NotificationContext context) voidonInstanceConfigChange(List<org.apache.helix.model.InstanceConfig> instanceConfigs, org.apache.helix.NotificationContext context) This function will assign a unique group id per group.voidrefresh()
-
Field Details
-
DEFAULT_INSTANCE_GROUP_ID
public static final int DEFAULT_INSTANCE_GROUP_ID- See Also:
-
-
Constructor Details
-
HelixInstanceConfigRepository
-
-
Method Details
-
refresh
public void refresh()- Specified by:
refreshin interfaceVeniceResource
-
clear
public void clear()- Specified by:
clearin interfaceVeniceResource
-
getInstanceGroupId
-
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:
onInstanceConfigChangein interfaceorg.apache.helix.api.listeners.InstanceConfigChangeListener
-
onClusterConfigChange
public void onClusterConfigChange(org.apache.helix.model.ClusterConfig clusterConfig, org.apache.helix.NotificationContext context) - Specified by:
onClusterConfigChangein interfaceorg.apache.helix.api.listeners.ClusterConfigChangeListener
-