Configuration files: These files are used to configure a hadoop cluster.
core-site.xml: All Hadoop services and clients use this file to locate the NameNode, so this file must be copied to each node that is either running a Hadoop service or is a client node. The Secondary NameNode uses this file to determine the location for storing fsimage and edits lognamefs.checkpoint.dir/namelocally, and the location of the NameNodenamefs.namedefault.name/name.Use the
core-site.xmlfile to isolate communication issues with the NameNode host machine.hdfs-site.xml: HDFS services use this file, which contains a number of important properties. These include:HTTP addresses for the two services
Replication for DataNodes
namedfs.replication/name>DataNode block storage location
namedfs.data.dir/nameNameNode metadata storage
namedfs.name.dir/name
Use the
hdfs-site.xmlfile to isolate NameNode start-up issues. Typically, NameNode start-up issues are caused when NameNode fails to load thefsimageand edits log to merge. Ensure that the values for the location properties inhdfs-site.xmlare valid locations.datanode.xml:DataNode services use the
datanode.xmlfile to specify the maximum and minimum heap size for the DataNode service. To troubleshoot issues with DataNode: change the value for-Xmx, which changes the maximum heap size for the DataNode service. Restart the affected DataNode host machine.namenode.xml:NameNode services use the
namenode.xmlfile to specify the maximum and minimum heap size for the NameNode service. To troubleshoot issues with NameNode, change the value for-Xmx, which changes the maximum heap size for NameNode service. Restart the affected NameNode host machine.secondarynamenode.xml:Secondary NameNode services use the
secondarynamenode.xmlfile to specify the maximum and minimum heap size for the Secondary NameNode service. To troubleshoot issues with Secondary NameNode, change the value for -Xmx, which changes the maximum heap size for Secondary NameNode service. Restart the affected Secondary NameNode host machine.hadoop-policy.xml:Use the
hadoop-policy.xmlfile to configure service-level authorization/ACLs within Hadoop. NameNode accesses this file. Use this file to troubleshoot permission related issues for NameNode.log4j.properties:Use the
log4j.propertiesfile to modify the log purging intervals of the HDFS logs. This file defines logging for all the Hadoop services. It includes, information related to appenders used for logging and layout. For more details, see the log4j documentation.
Log Files: Following are sets of log files for each of the HDFS services. They are stored in
c:\hadoop\logs\hadoopandc:\hdp\hadoop-1.1.0- SNAPSHOT\binby default.HDFS .out files: Log files with the .out extension are located in
c:\hdp\hadoop-1.1.0-SNAPSHOT\bin. They have the following naming conventions:datanode.out.lognamenode.out.logsecondarynamenode.out.log
These files are created and written to when HDFS services are bootstrapped. Use these files to isolate launch issues with DataNode, NameNode, or Secondary NameNode services.
HDFS
.wrapperfiles: The log files with the .wrapper extension are located inc:\hdp\hadoop-1.1.0-SNAPSHOT\binand have the following file names:datanode.wrapper.lognamenode.wrapper.logsecondarynamenode.wrapper.log
These files contain the start-up command string to start the service, and list process ID output on service start-up.
HDFS
.logand.errfiles:The following files are located in
c:\hdp\hadoop-1.1.0-SNAPSHOT\bin:datanode.err.lognamenode.err.logsecondarynamenode.err.log
The following files are located in
c:\hadoop\logs\hadoop:hadoop-datanode-Hostname.loghadoop-namenode-Hostname.loghadoop-secondarynamenode-Hostname.log
These files contain log messages for the running Java service. If there are any errors encountered while the service is already running, the stack trace of the error is logged in the above files.
Hostnameis the host where the service is running. For example, on a node where the host name ishost3, the file would be saved ashadoop-namenode-host3.log.![[Note]](../common/images/admon/note.png)
Note By default, these log files are rotated daily. Use the
c:\hdp\hadoop-1.1.0- SNAPSHOT\conf\log4j.propertiesfile to change log rotation frequency.HDFS <.
date> files:Log files with the <.
date> extension have the following format:hadoop-namenode-$Hostname.log.<date>hadoop-datanode-$Hostname.log.<date>hadoop-secondarynamenode-$Hostname.log.<date>
When a .log file is rotated, the current date is appended to the file name; for example:
hadoop-datanode- hdp121.localdomain.com.log.2013-02-08.Use these files to compare the past state of your cluster with the current state, to identify potential patterns.

