Package com.linkedin.venice.router.api
Class VeniceHostHealth
java.lang.Object
com.linkedin.venice.router.api.VeniceHostHealth
- All Implemented Interfaces:
HostHealthMonitor<Instance>
VeniceHostHealth
the aggregate statistics for HostHealthStats.
It recomputes the aggregate metrics for the host healthiness of the cluster.-
Field Summary
-
Constructor Summary
ConstructorDescriptionVeniceHostHealth
(LiveInstanceMonitor liveInstanceMonitor, StorageNodeClient storageNodeClient, VeniceRouterConfig config, RouteHttpRequestStats routeHttpRequestStats, AggHostHealthStats aggHostHealthStats) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isHostHealthy
(Instance instance, String partitionName) To check if a host is healthy/responsive.void
setHostAsHealthy
(Instance hostname) If the host is marked as unhealthy before, remove it from the unhealthy host set and log this status change.void
setHostAsUnhealthy
(Instance instance) Mark that something is wrong with an entire host and it should not be used for queries.
-
Field Details
-
unhealthyHosts
-
-
Constructor Details
-
VeniceHostHealth
public VeniceHostHealth(LiveInstanceMonitor liveInstanceMonitor, StorageNodeClient storageNodeClient, VeniceRouterConfig config, RouteHttpRequestStats routeHttpRequestStats, AggHostHealthStats aggHostHealthStats)
-
-
Method Details
-
setHostAsUnhealthy
Mark that something is wrong with an entire host and it should not be used for queries.- Parameters:
instance
-
-
setHostAsHealthy
If the host is marked as unhealthy before, remove it from the unhealthy host set and log this status change.- Parameters:
hostname
-
-
isHostHealthy
Description copied from interface:HostHealthMonitor
To check if a host is healthy/responsive.- Specified by:
isHostHealthy
in interfaceHostHealthMonitor<Instance>
- Parameters:
instance
- the host name, including the service port- Returns:
- the host is healthy or not
-