Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

How can I fetch a fsImage from a certain namenode/namespace?


When there are multiple namespaces, <hdfs dfsadmin -fetchImage> command seems to fetch a fsImage from the default namespace.


What I need is to get fsImages from every namespaces.


How can I pass the target namespace when using dfsadmin command?


Cloudera Employee



Try below command


hdfs dfsadmin -Dfs.defaultFS=hdfs://<name service> -fetchImage /tmp


Make sure the name service configs are already in place.


The general command line syntax is
bin/hadoop command [genericOptions] [commandOptions]


Generic options supported are
-conf <configuration file> specify an application configuration file
-D <property=value> use value for given property
-fs <local|namenode:port> specify a namenode