public 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 and Description | 
|---|---|
| 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 Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
                    throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic boolean isHealthy()
HealthReporterisHealthy in interface HealthReporterprotected void setHealthy(boolean healthy)
healthy - whether the node is healthypublic String getHealthReport()
HealthReportergetHealthReport in interface HealthReporterpublic long getLastHealthReportTime()
HealthReportergetLastHealthReportTime in interface HealthReporterCopyright © 2008–2023 Apache Software Foundation. All rights reserved.