Interface HealthReporter
- All Known Implementing Classes:
ExceptionReporter,LocalDirsHandlerService,NodeHealthCheckerService,NodeHealthScriptRunner,TimedHealthReporterService
public interface HealthReporter
Interface providing information about the health of a service.
Associated pieces of information:
- whether the service is healthy (
isHealthy()) - report of the healthiness (
getHealthReport()) - latest timestamp of the health check
(
getLastHealthReportTime())
NodeHealthCheckerService.
Developers are discouraged to implement new Java-based health scripts,
they should rather try to implement it as a script and use the
NodeHealthScriptRunner implementation.-
Method Summary
Modifier and TypeMethodDescriptionReturns output from health check.longReturns time stamp when node health check was last run.booleanGets whether the node is healthy or not.
-
Method Details
-
isHealthy
boolean isHealthy()Gets whether the node is healthy or not.- Returns:
- true if node is healthy
-
getHealthReport
String getHealthReport()Returns output from health check. If node is healthy then an empty string is returned.- Returns:
- output from health check
-
getLastHealthReportTime
long getLastHealthReportTime()Returns time stamp when node health check was last run.- Returns:
- timestamp when node health script was last run
-