HDFS commands for metadata files and directories
You can use HDFS commands to manipulate metadata files and directories.
- hdfs namenode
Automatically saves a new checkpoint at NameNode startup. As stated earlier, checkpointing is the process of merging any outstanding edit logs with the latest
fsimage, saving the full state to a new
fsimagefile, and rolling
editsmeans finalizing the current
edits_inprogressand starting a new one.
- hdfs dfsadmin -safemode enter
- hdfs dfsadmin -saveNamespace
Saves a new checkpoint (similar to restarting NameNode) while the NameNode process remains running. The NameNode must be in safe mode, and all attempted write activity fails while this command runs.
- hdfs dfsadmin -rollEdits
edits. Safe mode is not required.
This can be useful if a standby NameNode is lagging behind the active NameNode and you want it to get caught up more quickly. The standby NameNode can only read finalized edit log segments, not the current in progress
- hdfs dfsadmin -fetchImage
Downloads the latest
fsimagefrom the NameNode. This can be helpful for a remote backup type of scenario.