Ah, this seems to work. I saw the YarnJob.scala was referencing __package to launch to AM itself.
yarn.am.opts=-Xmx768m -XX:+UseSerialGC -Dlog4j.configuration=file://$(pwd)/__package/lib/log4j-am.xml On Tue, Jun 23, 2015 at 12:40 PM, Roger Hoover <roger.hoo...@gmail.com> wrote: > Hi, > > I want the App Master to log at INFO level and the container to log at > ERROR. Is there a way to configure the AM to use a different log4j config > file? > > I'm trying to setting yarn.am.opts but ran couldn't get it to work with > system properties. > > yarn.am.opts=-Xmx768m -XX:+UseSerialGC > -Dlog4j.configuration=file://${user.dir}/lib/log4j-am.xml > > give bad substitution error. > > This actually works it feels too ugly. > > yarn.am.opts=-Xmx768m -XX:+UseSerialGC -Dlog4j.configuration=file://$(pwd > | cut -d/ -f-9 | xargs -IXXX -n1 find XXX -name log4j-am.xml -print) > > What's the right way to do it? > > Thanks, > > Roger >