Alexander
Alexander

Reputation: 1743

Modifying log4j.properties file on AWS Elastic MapReduce

I'm using AWS Elastic MapReduce and I would like to be able to set the logging level. For example, I would like for log.isDebugEnabled() to return true. A bit of googling led me to find this blog article:

http://vangjee.wordpress.com/2012/03/24/an-approach-to-controlling-logging-on-amazon-web-services-aws-elastic-mapreduce-emr/

which basically suggests writing a shell script to copy and overwrite the local log4j.properties file. This seems like a complicated approach. I would prefer a simpler way of setting the debug level. Is there any way?

Upvotes: 2

Views: 1340

Answers (1)

Amar
Amar

Reputation: 12010

There are 2 other ways:

  1. Using hadoop daemonlog -setlevel command one can set the logging level for a given Hadoop daemon and classname.
  2. Visit the jobtracker's web UI and set the log name's level. The web UI url would be : http://<host:port>/logLevel

but both these ways only set the log levels for the timespan till the daemons are running, as soon as they are restarted, they will pick-up the one's in log4j.properties.

Read more here.

Upvotes: 1

Related Questions