Interface FailureDetector
-
- All Known Implementing Classes:
BaseExponentialBackoffRetryFailureDetector,ConnectionFailureDetector,NoOpFailureDetector
@Private @Evolving @ThreadSafe public interface FailureDetectorTheFailureDetectordetects unhealthy servers based on the query responses. When it detects an unhealthy server, it will notify the listener via a callback, and schedule a delay to retry the unhealthy server later via another callback.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFailureDetector.ListenerListener for the failure detector.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>getUnhealthyServers()Returns all the unhealthy servers.voidinit(org.apache.pinot.spi.env.PinotConfiguration config, org.apache.pinot.common.metrics.BrokerMetrics brokerMetrics)Initializes the failure detector.voidmarkServerHealthy(String instanceId)Marks a server as healthy.voidmarkServerUnhealthy(String instanceId)Marks a server as unhealthy.voidnotifyQueryFinished(QueryResponse queryResponse)Notifies the failure detector that a query is finished (COMPLETED, FAILED or TIMED_OUT).voidnotifyQuerySubmitted(QueryResponse queryResponse)Notifies the failure detector that a query is submitted.voidregister(FailureDetector.Listener listener)Registers a listener to the failure detector.voidstart()Starts the failure detector.voidstop()Stops the failure detector.
-
-
-
Method Detail
-
init
void init(org.apache.pinot.spi.env.PinotConfiguration config, org.apache.pinot.common.metrics.BrokerMetrics brokerMetrics)Initializes the failure detector.
-
register
void register(FailureDetector.Listener listener)
Registers a listener to the failure detector.
-
start
void start()
Starts the failure detector. Listeners should be registered before starting the failure detector.
-
notifyQuerySubmitted
void notifyQuerySubmitted(QueryResponse queryResponse)
Notifies the failure detector that a query is submitted.
-
notifyQueryFinished
void notifyQueryFinished(QueryResponse queryResponse)
Notifies the failure detector that a query is finished (COMPLETED, FAILED or TIMED_OUT).
-
markServerHealthy
void markServerHealthy(String instanceId)
Marks a server as healthy.
-
markServerUnhealthy
void markServerUnhealthy(String instanceId)
Marks a server as unhealthy.
-
stop
void stop()
Stops the failure detector.
-
-