Question:
How to mute DEBUG messages on AWS Elastic MapReduce Master node?
1 2 3 4 5 6 7 8 9 |
hbase(main):003:0> list TABLE mydb 1 row(s) in 0.0510 seconds hbase(main):004:0> 00:25:17.104 [main-SendThread(ip-172-31-14-206.ec2.internal:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x1493a5c3b78001b after 1ms hbase(main):005:0* 00:26:17.165 [main-SendThread(ip-172-31-14-206.ec2.internal:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x1493a5c3b78001b after 1ms |
Answer:
I don’t know if there is some option in Web UI to change log verbosity.
But there must be a Zookeeper (which is using Log4j) configuration folder ${ZOOKEEPER_HOME}/conf where you can edit file logj4.properties and specify:
1 2 |
zookeeper.console.threshold=WARN |
But I think that those changes must be done not directly in Zookeeper, but in HBase log configuration –${HBASE_HOME}/conf (HBase also use Log4j), because HBase can manage Zookeeper.
There are few parameters that can be edited there:
1 2 3 4 5 6 7 8 9 10 |
# Define some default values that can be overridden by system properties hbase.root.logger=INFO,console hbase.security.logger=INFO,console # Main log level log4j.threshold=ALL # Zookeeper log level log4j.logger.org.apache.zookeeper=INFO |
To find this file you can try next command:
1 2 3 4 |
$ find /* -name "log4j.properties" | grep -E "zookeeper|hbase" /hadoop/zookeeper/conf/log4j.properties /hadoop/hbase/conf/log4j.properties |