Hadoop Distributed File System ~~~ learning notes

Hadoop.png

The image comes from Google Images Engine by searching "HDFS.png"

An HDFS cluster has two types of nodes operating in a master-worker pattern: a namenode (the master) and a number of datanodes (workers).

1. NameNode

The NameNode maintains the namespace tree and the mapping of tfile blocks to DataNodes. This information is stored persistently on the local disk in the form of two files: the namespace image and edit log.

2. DataNode

In order to verify the namespace ID and the software version of the DataNode, each DataNode connects to the NameNode via a handshake during startup. The DataNode may automatically shut down if neither matches that of the NameNode. After the handshake, the DataNode registers with the NameNode. Then DataNode maintains a unique storage IDs. The storage ID of a DataNode is assigned when it registers with NameNode for the first time and will not change any more.
A DataNode identifies block replicas in its possession to the NameNode by sending a block report. A first block report is sent immediately after the DataNode registration. Subsequent block reports are sent every hour in order to provide NameNode with up-to-date view of where block replicas are located on the cluster.
During normal operation, the DataNode send heartbeats in a frequency of three seconds to the NameNode to confirm that the DataNode is operating and its block relicas are available. If NameNode does not receive any heartbeats from a DataNode in TEN minutes, it considers the DataNode to be out of service and the block replica hosted by the DataNode to be unavailable. Then the NameNode schedules another replicas of the unavailable blocks on other DataNodes.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 世界上有几种人特别招人恨。 第一种是怎么吃都不胖的,第二种是怎么玩手机看电视都不近视的,第三种是怎么吃辣都不长痘的...
    玉妃说阅读 1,984评论 0 0
  • 雷雁雄9月15日总结:今天接儿子放学,军训了10天,再学习了5天,半个月了才回家,一路上和儿子聊学习和生活,觉得儿...
    雷雁雄阅读 131评论 0 0
  • 今天,两个宝贝度过了非常开心的一天,他们或许并不太理解什么是儿童节,但他清楚这一天与往常有些不一样。学校举行了儿童...
    白慕华阅读 233评论 0 0