Hadoop NameNode is a single point of failure. By configuring SecondaryNameNode, the filesystem image and edit log files can be backed up periodically. And in case of NameNode failure, the backup files can be used to recover the NameNode. In this recipe, we will outline steps to configure SecondaryNameNode.
We assume that Hadoop has been configured correctly.
Log in to the master node from the cluster administration machine using the following command:
ssh hduser@master
Perform the following steps to configure SecondaryNameNode:
Stop the cluster using the following command:
stop-all.sh
Add or change the following into the file
$HADOOP_HOME/conf/hdfs-site.xml
:<property> <name>fs.checkpoint.dir</name> <value>/hadoop/dfs/namesecondary</value> </property>
If this property is not set explicitly, the default checkpoint directory will be
${hadoop.tmp.dir}/dfs/namesecondary
.Start the cluster using the following...