hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anuhan Torgonshar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-9350) Change log level to WARN when ShellCommandExecutor.execute() occurs exception
Date Sun, 07 Jul 2019 14:38:00 GMT

     [ https://issues.apache.org/jira/browse/YARN-9350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Anuhan Torgonshar updated YARN-9350:
------------------------------------
    Issue Type: Improvement  (was: Bug)

> Change log level to WARN when ShellCommandExecutor.execute() occurs exception 
> ------------------------------------------------------------------------------
>
>                 Key: YARN-9350
>                 URL: https://issues.apache.org/jira/browse/YARN-9350
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: yarn
>    Affects Versions: 3.1.0, 2.8.5
>            Reporter: Anuhan Torgonshar
>            Priority: Major
>              Labels: easyfix
>         Attachments: NodeHealthScriptRunner.java, PrivilegedOperationExecutor.java, WindowsBasedProcessTree.java
>
>
> When method ShellCommandExecutor.execute() occurs exception , it has inconsistent log
level practices in different places as following :
> {code:java}
> //hadoop-2.8.5-src\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-common\src\main\java\org\apache\hadoop\yarn\util\WindowsBasedProcessTree.java
> //log statement line number:69
> //log level:error
> try {
>    shellExecutor.execute();
> } catch (IOException e) {
>    LOG.error(StringUtils.stringifyException(e));
> } finally {
>    String output = shellExecutor.getOutput();
>    if (output != null &&
>    output.contains("Prints to stdout a list of processes in the task")) {
>    return true;
> }
> //hadoop-2.8.5-src\hadoop-common-project\hadoop-common\src\main\java\org\apache\hadoop\util\NodeHealthScriptRunner.java
> //log statement line number:116
> //log level:warn
> try {
>   shexec.execute();
> } catch (ExitCodeException e) {
>   ......
> } catch (Exception e) {
>    LOG.warn("Caught exception : " + e.getMessage());
>    if (!shexec.isTimedOut()) {
>      status = HealthCheckerExitStatus.FAILED_WITH_EXCEPTION;
>    } else {
>      status = HealthCheckerExitStatus.TIMED_OUT;
>    }
>    exceptionStackTrace = StringUtils.stringifyException(e);
> } finally {
>    ......
> }
> //hadoop-2.8.5-src\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-server-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\containermanager\linux\privileged\PrivilegedOperationExecutor.java
> //log statement line number:179
> //log level:warn
> try {
>    exec.execute();
>    if (LOG.isDebugEnabled()) {
>      LOG.debug("command array:");
>      LOG.debug(Arrays.toString(fullCommandArray));
>      LOG.debug("Privileged Execution Operation Output:");
>      LOG.debug(exec.getOutput());
>    }
> } catch (ExitCodeException e) {
>    ......
> } catch (IOException e) {
> LOG.warn("IOException executing command: ", e);
> throw new PrivilegedOperationException(e);
> }{code}
> There are 2 similar code snippets assign WARN level, when execute() occurs exception,
simultaneously only 1 code snippet chooses ERROR level for same situation. Therefore, I think
this one log statement is more likely to be assigned WARN level.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message