class HealthChecker extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
HealthChecker.HealthCheckerExitStatus |
Modifier and Type | Field and Description |
---|---|
private static String |
ERROR_PATTERN
Pattern used for searching in the output of the node health script
|
private String |
exceptionStackTrace |
private String |
healthCheckScript |
private static org.slf4j.Logger |
LOG |
private long |
scriptTimeout |
private org.apache.hadoop.util.Shell.ShellCommandExecutor |
shexec |
Constructor and Description |
---|
HealthChecker() |
Modifier and Type | Method and Description |
---|---|
HealthReport |
checkHealth() |
private String |
getHealthReport(HealthChecker.HealthCheckerExitStatus status) |
private boolean |
hasErrors(String output) |
void |
init(String location,
long timeout)
Initialize.
|
private static final org.slf4j.Logger LOG
private org.apache.hadoop.util.Shell.ShellCommandExecutor shexec
private String exceptionStackTrace
private static final String ERROR_PATTERN
private String healthCheckScript
private long scriptTimeout
HealthChecker()
public void init(String location, long timeout)
location
- the location of the health scripttimeout
- the timeout to be used for the health scriptpublic HealthReport checkHealth()
private String getHealthReport(HealthChecker.HealthCheckerExitStatus status)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.