diff --git hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java index c3bef37..cf65814 100644 --- hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java +++ hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java @@ -105,7 +105,6 @@ public void run() { try { shexec.execute(); } catch (ExitCodeException e) { - // ignore the exit code of the script exceptionStackTrace = StringUtils.stringifyException(e); status = HealthCheckerExitStatus.FAILED_WITH_EXIT_CODE; // On Windows, we will not hit the Stream closed IOException @@ -135,19 +134,14 @@ public void run() { * Method which is used to parse output from the node health monitor and * send to the report address. * - * The timed out script or script which causes IOException output is - * ignored. - * * The node is marked unhealthy if *
    *
  1. The node health script times out
  2. *
  3. The node health scripts output has a line which begins with ERROR
  4. + *
  5. The node health script return a non-zero exit code
  6. *
  7. An exception is thrown while executing the script
  8. *
- * If the script throws {@link IOException} or {@link ExitCodeException} the - * output is ignored and node is left remaining healthy, as script might - * have syntax error. - * + * * @param status */ void reportHealthStatus(HealthCheckerExitStatus status) {