public HealthReport checkHealth() {
    HealthCheckerExitStatus status = HealthCheckerExitStatus.SUCCESS;
    try {
      // Calling this execute leaves around running executor threads.
      shexec.execute();
    } catch (ExitCodeException e) {
      // ignore the exit code of the script
      LOG.warn("Caught exception : " + e + ",exit code:" + e.getExitCode());
      status = HealthCheckerExitStatus.FAILED_WITH_EXIT_CODE;
    } catch (IOException e) {
      LOG.warn("Caught exception : " + e);
      status = HealthCheckerExitStatus.FAILED_WITH_EXCEPTION;
      exceptionStackTrace = org.apache.hadoop.util.StringUtils.stringifyException(e);
    } finally {
      if (shexec.isTimedOut()) {
        status = HealthCheckerExitStatus.TIMED_OUT;
      }
      if (status == HealthCheckerExitStatus.SUCCESS) {
        if (hasErrors(shexec.getOutput())) {
          status = HealthCheckerExitStatus.FAILED;
        }
      }
    }
    return new HealthReport(status, getHealthReport(status));
  }
Initialize.
@param location the location of the health script
@param timeout  the timeout to be used for the health script
hbase-server/src/main/java/org/apache/hadoop/hbase/HealthChecker.java