Class VeniceHostHealth

java.lang.Object
com.linkedin.venice.router.api.VeniceHostHealth
All Implemented Interfaces:
HostHealthMonitor<Instance>

public class VeniceHostHealth extends Object implements HostHealthMonitor<Instance>
VeniceHostHealth the aggregate statistics for HostHealthStats. It recomputes the aggregate metrics for the host healthiness of the cluster.
  • Field Details

    • unhealthyHosts

      protected Set<String> unhealthyHosts
  • Constructor Details

  • Method Details

    • setHostAsUnhealthy

      public void setHostAsUnhealthy(Instance instance)
      Mark that something is wrong with an entire host and it should not be used for queries.
      Parameters:
      instance -
    • setHostAsHealthy

      public void setHostAsHealthy(Instance hostname)
      If the host is marked as unhealthy before, remove it from the unhealthy host set and log this status change.
      Parameters:
      hostname -
    • isHostHealthy

      public boolean isHostHealthy(Instance instance, String partitionName)
      Description copied from interface: HostHealthMonitor
      To check if a host is healthy/responsive.
      Specified by:
      isHostHealthy in interface HostHealthMonitor<Instance>
      Parameters:
      instance - the host name, including the service port
      Returns:
      the host is healthy or not