Hadoop Learning Log Settings


The output of Hadoop Log is very important for students who are new to Hadoop. Through the Log, you can get the running process of Hadoop. By analyzing the Log, it can be used for troubleshooting during the Hadoop running process, as well as a preliminary understanding of the Hadoop running process.

Hadoop uses Log4j as its Log component. By default, the output Log level is INFO. You can modify the default Log level to Debug or ALL to get more detailed Log information.

修改的文件有:
${HADOOP_HOME}/etc/hadoop/log4j.properties,
     hadoop.root.logger=ALL,console
${HADOOP_HOME}/etc/hadoop/hadoop-env.sh
     export HADOOP_NAMENODE_OPTS="-Xmx30720m -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-ALL,RFAS}-Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-ALL,NullAppender} $HADOOP_NAMENODE_OPTS"
${HADOOP_HOME}/sbin/hadoop-daemon.sh
      export HADOOP_ROOT_LOGGER=${HADOOP_ROOT_LOGGER:-"ALL,RFA"}
      export HADOOP_ROOT_LOGGER=${HADOOP_ROOT_LOGGER:-"ALL,RFA"}
      export HADOOP_SECURITY_LOGGER=${HADOOP_SECURITY_LOGGER:-"ALL,RFAS"}
      export HDFS_AUDIT_LOGGER=${HDFS_AUDIT_LOGGER:-"ALL,NullAppender"}
${HADOOP_HOME}/sbin/mr-jobhistory-daemon.sh
      export HADOOP_MAPRED_ROOT_LOGGER=${HADOOP_MAPRED_ROOT_LOGGER:-ALL,RFA}
      export HADOOP_JHS_LOGGER=${HADOOP_JHS_LOGGER:-ALL,JSA}
${HADOOP_HOME}/sbin/yarn-daemon.sh
      export YARN_ROOT_LOGGER=${YARN_ROOT_LOGGER:-ALL,RFA}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326481462&siteId=291194637