in spark-operator/src/main/java/org/apache/spark/k8s/operator/probe/HealthProbe.java [53:76]
public boolean isHealthy() {
Optional<Boolean> operatorsAreReady = areOperatorsStarted(operators);
if (operatorsAreReady.isEmpty() || !operatorsAreReady.get()) {
return false;
}
Optional<Boolean> runtimeInfosAreHealthy =
operators.stream()
.map(operator -> checkInformersHealth(operator.getRuntimeInfo()))
.reduce((a, b) -> a && b);
if (runtimeInfosAreHealthy.isEmpty() || !runtimeInfosAreHealthy.get()) {
return false;
}
for (SentinelManager<?> sentinelManager : sentinelManagers) {
if (!sentinelManager.allSentinelsAreHealthy()) {
log.error("One sentinel manager {} reported an unhealthy condition.", sentinelManager);
return false;
}
}
return true;
}