When you start the daemons, namenode will check the xml configuration file with the name
core-site.xml
located in the confo folder. On my system, it is located in usr / lib / hadoop / conf, which is the installation directory installed by hadoop.
In this configuration file you can see
<configuration> <property> <name>hadoop.tmp.dir</name> <value>/var/lib/hadoop-0.20/cache/${user.name}</value> </property> </configuration>
This code / var / lib / hadoop-0.20 / cache / indicates the location of the fsimage, fstime, and edits file.
If, in the event of a namenode failure, for some specific time, the fsimage data will be temporarily stored in secondynamenode, and after the namenode is restored, the temporary data will be stored in fsimage.
source share