public class NodeHealthScriptRunner extends AbstractService
Service.STATE| Constructor and Description |
|---|
NodeHealthScriptRunner() |
| Modifier and Type | Method and Description |
|---|---|
String |
getHealthReport()
Returns output from health script.
|
long |
getLastReportedTime()
Returns time stamp when node health script was last run.
|
boolean |
isHealthy()
Gets the if the node is healthy or not
|
protected void |
serviceInit(Configuration conf)
All initialization code needed by a service.
|
protected void |
serviceStart()
Method used to start the Node health monitoring.
|
protected void |
serviceStop()
Method used to terminate the node health monitoring service.
|
static boolean |
shouldRun(Configuration conf)
Method used to determine if or not node health monitoring service should be
started or not.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected void serviceInit(Configuration conf) throws Exception
AbstractServiceAbstractService.init(Configuration) prevents re-entrancy.
The base implementation checks to see if the subclass has created
a new configuration instance, and if so, updates the base class valueserviceInit in class AbstractServiceconf - configurationException - on a failure -these will be caught,
possibly wrapped, and wil; trigger a service stopprotected void serviceStart()
throws Exception
serviceStart in class AbstractServiceException - if needed -these will be caught,
wrapped, and trigger a service stopprotected void serviceStop()
serviceStop in class AbstractServicepublic boolean isHealthy()
public String getHealthReport()
public long getLastReportedTime()
public static boolean shouldRun(Configuration conf)
conf - Copyright © 2013 Apache Software Foundation. All rights reserved.