Class D2HealthChecker

java.lang.Object
com.linkedin.venice.d2.D2HealthChecker

public class D2HealthChecker extends Object
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 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

      public void start() throws Exception
      Throws:
      Exception
    • isBadState

      public boolean isBadState()