What exactly is hadoop namenode formatting?

五迷三道 提交于 2019-11-28 07:13:06

Hadoop NameNode is the centralized place of an HDFS file system which keeps the directory tree of all files in the file system, and 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. By doing that, all the information on the datanodes are lost and they can be reused for new data.

Alkesh_IT

hadoop namenode -format formats your file system at the location specified in hdfs-site.xml

here my namenode directory is /usr/local/hadoop/dfs/name

<property>
<name>dfs.name.dir</name>
<value>/usr/local/hadoop/dfs/name</value>
<final>true</final>
</property>

Simply say,

  • NameNode contains metadata about data stored in DataNodes;
  • If NameNode is formatted, metadata alone gets deleted.
  • Original data in DataNode will not get affected;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!