You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Peter Cseh (JIRA)" <ji...@apache.org> on 2016/12/12 11:26:58 UTC

[jira] [Commented] (OOZIE-2739) Remove property expansion pattern from ShellMain's log4j properties content

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

Peter Cseh commented on OOZIE-2739:
-----------------------------------

+1 (non-binding) 
Thanks for the fix [~qwertymaniac]! 

> Remove property expansion pattern from ShellMain's log4j properties content
> ---------------------------------------------------------------------------
>
>                 Key: OOZIE-2739
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2739
>             Project: Oozie
>          Issue Type: Bug
>          Components: action
>    Affects Versions: 4.3.0
>            Reporter: Harsh J
>            Assignee: Harsh J
>            Priority: Minor
>         Attachments: OOZIE-2739.patch, OOZIE-2739.patch, OOZIE-2739.patch, Screen Shot 2016-11-25 at 7.55.49 PM.png
>
>
> In OOZIE-2504 the following XML was added:
> {code}
>     <property>
>         <name>oozie.action.shell.setup.hadoop.conf.dir.log4j.content</name>
>         <value>
>             log4j.rootLogger=${hadoop.root.logger}
>             hadoop.root.logger=INFO,console
>             log4j.appender.console=org.apache.log4j.ConsoleAppender
>             log4j.appender.console.target=System.err
>             log4j.appender.console.layout=org.apache.log4j.PatternLayout
>             log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
>         </value>
> {code}
> The intention was to place the value of this configuration as-is into a generated log4j.properties when the ShellMain prepares the sub-environment. However, due to Apache Hadoop Common's Configuration class recognizing the dollar-brace syntax as a substitution variable, and also subsequently finding {{hadoop.root.logger}} set as a system property within task container environments, sets the written file to carry the line "log4j.rootLogger=INFO,CLA" or "log4j.rootLogger=INFO,CLRA".
> This in turn causes odd warnings from log4j to appear, about there being no such appender defined (which was intentional, i.e. to move out of CLA and onto console for the sub-commands).
> There's no way to write out the substitution syntax in a way that Configuration class wouldn't substitute it, so we should likely hard-code the value to be {{INFO,console}}. Those who wish to change it can do so at action levels with the whole new content anyway.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)