Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
Contributor

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?

1 REPLY 1

avatar
Contributor

@Si 

 

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