Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-2739

Remove property expansion pattern from ShellMain's log4j properties content

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3.0
    • 5.0.0b1
    • action
    • None

    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

        1. OOZIE-2739.patch
          4 kB
          Harsh J
        2. OOZIE-2739.patch
          4 kB
          Harsh J
        3. OOZIE-2739.patch
          0.7 kB
          Harsh J
        4. OOZIE-2739-4.patch
          4 kB
          Gézapeti
        5. Screen Shot 2016-11-25 at 7.55.49 PM.png
          65 kB
          Harsh J

        Issue Links

          Activity

            People

              qwertymaniac Harsh J
              qwertymaniac Harsh J
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: