Package com.linkedin.venice.d2
Class D2HealthChecker
java.lang.Object
com.linkedin.venice.d2.D2HealthChecker
Runs a daemon thread that consistently sends HTTP GET request to
admin healthcheck endpoint. If there are consecutive N bad status,
shuts down zookeeper announcer and waits until it receives N
consecutive good status to restart ZooKeeperAnnouncer
-
Constructor Summary
ConstructorDescriptionD2HealthChecker
(com.linkedin.d2.balancer.servers.ZooKeeperConnectionManager zkManager, long intervalMs, String healthCheckUrl, int minConsecutiveCount, ScheduledExecutorService executorService, int httpTimeoutMs) -
Method Summary
-
Constructor Details
-
D2HealthChecker
public D2HealthChecker(com.linkedin.d2.balancer.servers.ZooKeeperConnectionManager zkManager, long intervalMs, String healthCheckUrl, int minConsecutiveCount, ScheduledExecutorService executorService, int httpTimeoutMs)
-
-
Method Details
-
shutdown
public void shutdown() -
start
- Throws:
Exception
-
isBadState
public boolean isBadState()
-