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 Constructor Description HelixExternalViewRepository(SafeHelixManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
protected void
onCustomizedViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot)
protected void
onExternalViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot)
void
onIdealStateChange(java.util.List<org.apache.helix.model.IdealState> idealStates, org.apache.helix.NotificationContext changeContext)
void
refresh()
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 Detail
-
HelixExternalViewRepository
public HelixExternalViewRepository(SafeHelixManager manager)
-
-
Method Detail
-
onIdealStateChange
public void onIdealStateChange(java.util.List<org.apache.helix.model.IdealState> idealStates, org.apache.helix.NotificationContext changeContext)
- Specified by:
onIdealStateChange
in interfaceorg.apache.helix.api.listeners.IdealStateChangeListener
-
refresh
public void refresh()
Description copied from class:HelixBaseRoutingRepository
This method is used to add listener after HelixManager being connected. Otherwise, it will met error because adding listener before connecting.- Specified by:
refresh
in interfaceVeniceResource
- Overrides:
refresh
in classHelixBaseRoutingRepository
-
clear
public void clear()
- Specified by:
clear
in interfaceVeniceResource
- Overrides:
clear
in classHelixBaseRoutingRepository
-
onExternalViewDataChange
protected void onExternalViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot)
- Specified by:
onExternalViewDataChange
in classHelixBaseRoutingRepository
-
onCustomizedViewDataChange
protected void onCustomizedViewDataChange(org.apache.helix.spectator.RoutingTableSnapshot routingTableSnapshot)
- Specified by:
onCustomizedViewDataChange
in classHelixBaseRoutingRepository
-
-