System logging plays an important role in dealing with performance and security problems. In addition, the logging information can be used analytically to tune the performance of a Hadoop cluster. In this recipe, we will show you how to configure Hadoop logging.
Perform the following steps to configure Hadoop logging:
Log in to the master node with the following command from the Hadoop administrator machine:
ssh hduser@master
Check the current logging level of JobTracker with the following command:
hadoop daemonlog -getlevel master:50030 org.apache.hadoop.mapred.JobTracker
We will get an output similar to the following:
Connecting to http://master:50030/logLevel?log=org.apache.hadoop.mapred.JobTracker Submitted Log Name: org.apache.hadoop.mapred.JobTracker Log Class: org.apache.commons.logging.impl.Log4JLogger Effective level: INFO
Tell Hadoop to only log error events...