[
https://issues.apache.org/jira/browse/OOZIE-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237881#comment-15237881
]
Robert Kanter commented on OOZIE-2504:
--------------------------------------
Overall looks good. Thanks for figuring this out. One minor thing:
- I don't think that we should duplicate the default log4j config in
{{ShellMain#DEFAULT_LOG4J_CONTENT}} and oozie-default's
{{oozie.action.shell.setup.hadoop.conf.dir.log4j.content}}. It will be very
easy for that to get out of sync if changes are made later. I think we should
keep the oozie-default one, as we already use oozie-default as the source of
truth for all defaults now.
> Create a log4j.properties under HADOOP_CONF_DIR in Shell Action
> ---------------------------------------------------------------
>
> Key: OOZIE-2504
> URL: https://issues.apache.org/jira/browse/OOZIE-2504
> Project: Oozie
> Issue Type: Improvement
> Components: action
> Affects Versions: trunk
> Reporter: Harsh J
> Assignee: Harsh J
> Priority: Minor
> Attachments: OOZIE-2504.000.patch
>
>
> We currently do environment exports of {{HADOOP_CONF_DIR}} and
> {{YARN_CONF_DIR}}, when the feature of config directory is enabled, for
> catering to people wanting to use {{hadoop}} or such relying commands, and
> this works well.
> However, an issue occurs when {{<capture-output/>}} is enabled, wherein the
> commands, not finding a logger configuration, start using {{System.out}} by
> default [1], and any/all lines that match the capture output criteria from
> the log-spam in {{System.out}} make it into the captured results, which can
> break further logic done in subsequent actions relying on proper captured
> values.
> We can fix this by pre-preparing, optionally, a {{log4j.properties}} file
> under {{HADOOP_CONF_DIR}} and {{YARN_CONF_DIR}}, such that the commands use
> that logging configuration and write logs into {{System.err}} by default.
> [1] -
> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/ConsoleAppender.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)