Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Enabling LOG.isDebugEnabled at run time?

Enabling LOG.isDebugEnabled at run time?

Explorer

I'd like to be able to enabled LOG.isDebugEnabled at runtime to debug certain java classes, such as 'yarn scmadmin', but I don't see a way outside of modifying logging in Ambari or the logj4 properties. Any idea?

1 REPLY 1
Highlighted

Re: Enabling LOG.isDebugEnabled at run time?

New Contributor

There are 2 ways to do it.

1. Use commands hadoop daemonlog. Like hadoop daemonlog -setlevel <rm host:rm httport> <full class name including package name| or package name itself only> <level>

Here are some examples

hadoop daemonlog -setlevel <rm host:rm httport> org.apache.hadoop.yarn.server.resourcemanager DEBUG

Or to enable debug log on full use something like:

hadoop daemonlog -setlevel <rm host:rm httport> org.apache.hadoop.yarn DEBUG

Daemonlog reference help "Running Daemonlog make sure are yarn/hdfs cluster admin, e.g. you are part of yarn.admin.acl in case of yarn

2: Via, Namenode/Resourcemanger etc.. access daemon UI like http://<daamonhost>:<httpPort>/logLevel?log, then fill package/classname in test box shown in second row along with desried logging (like DEBUG) here, click "Set Log Level" button.

Using either of make sure use have web authenticatio on and you are part cluster admin group or

default static web user (which dr.who) is part of cluster admin group

Don't have an account?
Coming from Hortonworks? Activate your account here