[ 
https://issues.apache.org/jira/browse/YARN-9809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17138892#comment-17138892
 ] 

Eric Badger commented on YARN-9809:
-----------------------------------

{noformat:title=NodeHealthScriptRunner.newInstance()}
    if (!shouldRun(scriptName, nodeHealthScript)) {
      return null;
    }
{noformat}

{noformat:title=NodeHealthScriptRunner.shouldRun()}
  static boolean shouldRun(String script, String healthScript) {
    if (healthScript == null || healthScript.trim().isEmpty()) {
      LOG.info("Missing location for the node health check script \"{}\".",
          script);
      return false;
    }
{noformat}

If the health check script doesn't exist, then the health {{shouldRun}} will 
return false and the {{newInstance}} will return null. This will cause the 
health reporter to not be added as a service. So at the end of the day, your 
statement is correct. If the health check script doesn't exist, the node will 
report as healthy.

> NMs should supply a health status when registering with RM
> ----------------------------------------------------------
>
>                 Key: YARN-9809
>                 URL: https://issues.apache.org/jira/browse/YARN-9809
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Eric Badger
>            Assignee: Eric Badger
>            Priority: Major
>         Attachments: YARN-9809.001.patch, YARN-9809.002.patch, 
> YARN-9809.003.patch, YARN-9809.004.patch
>
>
> Currently if the NM registers with the RM and it is unhealthy, it can be 
> scheduled many containers before the first heartbeat. After the first 
> heartbeat, the RM will mark the NM as unhealthy and kill all of the 
> containers.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to