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

Harsh J updated OOZIE-2739:
---------------------------
    Attachment: OOZIE-2739.patch

> 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
>
>
> 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)

Reply via email to