Class HelixBaseRoutingRepository

java.lang.Object
com.linkedin.venice.helix.HelixBaseRoutingRepository
All Implemented Interfaces:
OnlineInstanceFinder, RoutingDataRepository, VeniceResource, org.apache.helix.api.listeners.ControllerChangeListener, org.apache.helix.api.listeners.RoutingTableChangeListener
Direct Known Subclasses:
HelixCustomizedViewOfflinePushRepository, HelixExternalViewRepository

public abstract class HelixBaseRoutingRepository extends Object implements RoutingDataRepository, org.apache.helix.api.listeners.ControllerChangeListener, org.apache.helix.api.listeners.RoutingTableChangeListener
Get routing data from Helix and convert it to our Venice partition and replica objects.

Although Helix RoutingTableProvider already cached routing data in local memory. But it only gets data from /$cluster/EXTERNALVIEW, /$cluster/CONFIGS/PARTICIPANTS, /$cluster/CUSTOMIZEDVIEW. Two parts of data are missed: Additional data in /$cluster/LIVEINSTANCES and partition number in /$cluster/IDEALSTATES. So we cached Venice partitions and instances here to include all of them and also convert them from Helix data structure to Venice data structure.

As this repository is used by Router, so here only cached the online instance at first. If Venice needs some more instances in other state, could add them in the further.