What does hadoop namenode -format do and is it safe to run? - Big Data In Real World

What does hadoop namenode -format do and is it safe to run?

Differences between RabbitMQ and Kafka
March 8, 2021
Definitive guide on Spark join algorithms
March 12, 2021
Differences between RabbitMQ and Kafka
March 8, 2021
Definitive guide on Spark join algorithms
March 12, 2021

Don’t run the command until you fully understand what you are trying to do.

hadoop namenode -format will format or delete all files and folders in the Namenode directory.

Namenode & HDFS metadata

Namenode is responsible for maintaining the metadata of HDFS. This includes information about the files, directories, block locations, permissions etc.

The above information is maintained under directory specified by dfs.namenode.name.dir

<property> 
   <name>dfs.namenode.name.dir</name> 
   <value>file:///data/dfs/namenode</value> 
</property>

hadoop namenode -format will wipe out the directory clean. This means you don’t have a way to know what was in the HDFS because you have now essentially deleted all the metadata managed by NameNdoe even though the data that is managed by the DataNode will not be deleted.

You usually don’t perform this operation on a cluster that is in operation. It is usually performed on a failed installation where you have decided to start from scratch.

Big Data In Real World
Big Data In Real World
We are a group of Big Data engineers who are passionate about Big Data and related Big Data technologies. We have designed, developed, deployed and maintained Big Data applications ranging from batch to real time streaming big data platforms. We have seen a wide range of real world big data problems, implemented some innovative and complex (or simple, depending on how you look at it) solutions.

Comments are closed.

What does hadoop namenode -format do and is it safe to run?
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.

Hadoop In Real World is now Big Data In Real World!

X