java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service, HealthReporterNodeHealthScriptRunnerpublic abstract class TimedHealthReporterService extends org.apache.hadoop.service.AbstractService implements HealthReporter
HealthReporter skeleton for regularly checking a specific
TimerTask and obtaining information about it.NodeHealthScriptRunner| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getHealthReport() |
Returns output from health check.
|
long |
getLastHealthReportTime() |
Returns time stamp when node health check was last run.
|
boolean |
isHealthy() |
Gets whether the node is healthy or not.
|
void |
serviceStart() |
Method used to start the health monitoring.
|
protected void |
serviceStop() |
Method used to terminate the health monitoring service.
|
protected void |
setHealthy(boolean healthy) |
Sets if the node is healthy or not.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic boolean isHealthy()
HealthReporterisHealthy in interface HealthReporterprotected void setHealthy(boolean healthy)
healthy - whether the node is healthypublic java.lang.String getHealthReport()
HealthReportergetHealthReport in interface HealthReporterpublic long getLastHealthReportTime()
HealthReportergetLastHealthReportTime in interface HealthReporterCopyright © 2008–2025 Apache Software Foundation. All rights reserved.