Class HelixLiveInstanceMonitor

  • All Implemented Interfaces:
    LiveInstanceMonitor, VeniceResource, org.apache.helix.zookeeper.zkclient.IZkChildListener

    public class HelixLiveInstanceMonitor
    extends java.lang.Object
    implements org.apache.helix.zookeeper.zkclient.IZkChildListener, VeniceResource, LiveInstanceMonitor
    This class is used to monitor the current live instances(Helix participators). Here, it is not using HelixManager because HelixManager is using the same ZkClient being used for all the Helix related ZK Watches/data operations. When there are a lot of state transitions during node starts/stops, it will take a very long time to let HelixManager to report the instance list change since those state transition notifications could happen earlier than node stop/start event. Under this circumstance, HelixManager won't report node list change in time. Using a separate ZkClient will allow node list change notification happen in a separate channel, so that node list change can be captured in time. This way is a little hacky since this class is reading from Helix ZK directory directly.
    • Constructor Detail

      • HelixLiveInstanceMonitor

        public HelixLiveInstanceMonitor​(org.apache.helix.zookeeper.impl.client.ZkClient zkClient,
                                        java.lang.String clusterName)