Package com.linkedin.venice.helix
Class HelixExternalViewRepository
java.lang.Object
com.linkedin.venice.helix.HelixBaseRoutingRepository
com.linkedin.venice.helix.HelixExternalViewRepository
- All Implemented Interfaces:
OnlineInstanceFinder,RoutingDataRepository,VeniceResource,org.apache.helix.api.listeners.ControllerChangeListener,org.apache.helix.api.listeners.IdealStateChangeListener,org.apache.helix.api.listeners.RoutingTableChangeListener
public class HelixExternalViewRepository
extends HelixBaseRoutingRepository
implements org.apache.helix.api.listeners.IdealStateChangeListener
Extend HelixBaseRoutingRepository to leverage external view data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.linkedin.venice.meta.RoutingDataRepository
RoutingDataRepository.RoutingDataChangedListener -
Field Summary
Fields inherited from class com.linkedin.venice.helix.HelixBaseRoutingRepository
dataSource, keyBuilder, listenerManager, liveInstancesMap, liveInstancesMapLock, manager, resourceAssignment -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected voidonCustomizedViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot) protected voidonExternalViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot) voidonIdealStateChange(List<org.apache.helix.model.IdealState> idealStates, org.apache.helix.NotificationContext changeContext) voidrefresh()This method is used to add listener after HelixManager being connected.Methods inherited from class com.linkedin.venice.helix.HelixBaseRoutingRepository
containsKafkaTopic, convertLiveInstances, doesResourcesExistInIdealState, getAllInstances, getLeaderController, getLeaderControllerChangeTimeMs, getLeaderInstance, getNumberOfPartitions, getPartitionAssignments, getReadyToServeInstances, getReadyToServeInstances, getResourceAssignment, getWorkingInstances, isLiveInstance, onControllerChange, onRoutingTableChange, subscribeRoutingDataChange, unSubscribeRoutingDataChange
-
Constructor Details
-
HelixExternalViewRepository
-
-
Method Details
-
onIdealStateChange
public void onIdealStateChange(List<org.apache.helix.model.IdealState> idealStates, org.apache.helix.NotificationContext changeContext) - Specified by:
onIdealStateChangein interfaceorg.apache.helix.api.listeners.IdealStateChangeListener
-
refresh
public void refresh()Description copied from class:HelixBaseRoutingRepositoryThis method is used to add listener after HelixManager being connected. Otherwise, it will met error because adding listener before connecting.- Specified by:
refreshin interfaceVeniceResource- Overrides:
refreshin classHelixBaseRoutingRepository
-
clear
public void clear()- Specified by:
clearin interfaceVeniceResource- Overrides:
clearin classHelixBaseRoutingRepository
-
onExternalViewDataChange
protected void onExternalViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot) - Specified by:
onExternalViewDataChangein classHelixBaseRoutingRepository
-
onCustomizedViewDataChange
protected void onCustomizedViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot) - Specified by:
onCustomizedViewDataChangein classHelixBaseRoutingRepository
-