What exactly is hadoop namenode formatting?

后端 未结 3 1599
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 02:12

What exactly is involved in namenode formatting. If I type in the following command into my terminal within my hadoop installation folder:

  bin/hadoop namen         


        
相关标签:
3条回答
  • 2020-12-09 02:17

    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.

    0 讨论(0)
  • 2020-12-09 02:30

    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;
    0 讨论(0)
  • 2020-12-09 02:41

    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>
    
    0 讨论(0)
提交回复
热议问题