Ethanlm commented on a change in pull request #3185: STORM-3557 allow health
checks to pass on timeout and add meter to track
URL: https://github.com/apache/storm/pull/3185#discussion_r363397740
##########
File path:
storm-server/src/main/java/org/apache/storm/healthcheck/HealthChecker.java
##########
@@ -66,10 +71,23 @@ public static int healthCheck(Map<String, Object> conf) {
// to execute properly, not that the system is unhealthy, in which case
// we don't want to start killing things.
- if (results.contains(FAILED) || results.contains(FAILED_WITH_EXIT_CODE)
- || results.contains(TIMEOUT)) {
+ if (results.contains(FAILED) ||
results.contains(FAILED_WITH_EXIT_CODE)) {
LOG.warn("The supervisor healthchecks failed!!!");
return 1;
+ } else if (results.contains(TIMEOUT)) {
+ LOG.warn("The supervisor healthchecks timedout!!!");
+ if (supervisor != null) {
+ Meter timeoutMeter =
supervisor.getMetricsRegistry().getMeter(Constants.SUPERVISOR_HEALTH_CHECK_TIMEOUTS);
+ if (timeoutMeter != null) {
+ timeoutMeter.mark();
+ }
+ }
+ Boolean failOnTimeouts =
ObjectReader.getBoolean(conf.get(DaemonConfig.STORM_HEALTH_CHECK_FAIL_ON_TIMEOUTS),
true);
Review comment:
We can remove this since it's already in the `default.yaml` file to avoid
duplicates.
Or remove the one in default.yaml
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services