Description
In OOZIE-2504 the following XML was added:
<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>
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.
Attachments
Attachments
Issue Links
- breaks
-
OOZIE-2504 Create a log4j.properties under HADOOP_CONF_DIR in Shell Action
- Closed