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 newfsimagefile, and rollingedits. Rollingeditsmeans finalizing the currentedits_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
-
Manually rolls
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
editsfile. - hdfs dfsadmin -fetchImage
-
Downloads the latest
fsimagefrom the NameNode. This can be helpful for a remote backup type of scenario.
