Safemode
On startup, the NameNode enters a special state called Safemode. Replication of data blocks does not occur when the NameNode is in the Safemode state. The NameNode receives Heartbeat and Blockreport messages from the DataNodes. A Blockreport contains the list of data blocks that a DataNode is hosting. Each block has a specified minimum number of replicas. A block is considered safely replicated when the minimum number of replicas of that data block has checked in with the NameNode. After a configurable percentage of safely replicated data blocks checks in with the NameNode (plus an additional 30 seconds), the NameNode exits the Safemode state. It then determines the list of data blocks (if any) that still have fewer than the specified number of replicas. The NameNode then replicates these blocks to other DataNodes.
在启动时,NameNode进入一个名为Safemode的特殊状态。当NameNode处于Safemode状态时,不会发生数据块的复制。NameNode从DataNode接收Heartbeat和Blockreport消息。Blockreport包含DataNode托管的数据块列表。每个块都有指定的最小副本数。当使用NameNode检入该数据块的最小副本数时,会认为该块是安全复制的。在可配置百分比的安全复制数据块使用NameNode检入(再加上30秒)后,NameNode退出Safemode状态。然后,它确定仍然具有少于指定数量的副本的数据块列表(如果有)。然后,NameNode将这些块复制到其他DataNode。
启动时,内存会加载元数据,这需要消耗一定的时间
HDFS之SaveMode
最新推荐文章于 2022-11-19 17:53:17 发布