You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Andras Piros (JIRA)" <ji...@apache.org> on 2018/05/03 18:54:00 UTC

[jira] [Commented] (OOZIE-3231) Oozie uses System.out.print to output ENV variables in ShellMain.java

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

Andras Piros commented on OOZIE-3231:
-------------------------------------

[~office@chaosmail.at] thanks for the idea!

At the {{*Main}} classes level that are run on YARN NodeManagers, we try to avoid as many dependencies as possible in order not to interfere with any of the user provided framework JARs. Same is true for logging.

To avoid any classpath collisions, let's just use [*{{java.util.logging.Logger}}*|https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html] because that's part of the JVM the Oozie actions are running with.  I also suggest to keep {{System.out.println()}} calls (or configure JULI to log to {{System.out}}) to maintain backwards compatibility even in case of JULI misconfiguration.

[~gezapeti] what are your thoughts?

> Oozie uses System.out.print to output ENV variables in ShellMain.java
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-3231
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3231
>             Project: Oozie
>          Issue Type: Bug
>          Components: action
>    Affects Versions: trunk, 4.2.0
>         Environment: We are using HDP 2.6.4 with Oozie 4.2
>            Reporter: Christoph Körner
>            Priority: Minor
>
> Oozie per default outputs debug information about the Shell Action such as command, arguments and environment variables which is then visible in the Yarn logs. This is indeed a nice feature for debugging.
> However, to do so it uses System.out.print which makes it impossible to configure this behavior. It would be better to use a Logger class for this, such that this behavior can be tuned in the Oozie job/action configuration.
> In Oozie 4.2. the problematic function is located here [https://github.com/apache/oozie/blob/branch-4.2/sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java#L244] - however the problem still exists on the master branch as well.



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