What is hadoop namenode format? and Why is it used?
Hadoop NameNode is the centralized place of an HDFS file system which keeps the directory tree of all files in the file system, and it tracks where across the cluster the file data is kept. In short, it keeps the metadata related to datanodes. When we format namenode it formats the meta-data related to data-nodes, and original Datanode remains unaffected.
Hadoop Namenode is used to specify the default file system and also the defaults of your local file system.So, you need to set it to a HDFS address. This is essential for configuration of client and your Local File system.
filesystem.namenode.
hdfs://192.168.1.2:9000/
Here the highlighted part is the address.
Note :
When we format namenode(bin/hadoop namenode -format) it formats the meta-data related to data-nodes but don’t effect original nodes. By doing this, all the information on the datanodes are lost and the datanodes becomes reusable for new data.