HDFS Architecture Notes

 1、Moving Computation is Cheaper than Moving Data

  A computation requested by an application is much more efficient if it is executed near the data it operates on. This is especially true when the size of the data set is huge. This minimizes network congestion and increases the overall throughput of the system. The assumption is that it is often better to migrate the computation closer to where the data is located rather than moving the data to where the application is running. HDFS provides interfaces for applications to move themselves closer to where the data is located.

 2、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.

 3、The Persistence of File System Metadata

  FsImage、EditLog.

 4、Staging

  HDFS client caches the file data into a temporary local file. Application writes are transparently redirected to this temporary local file. When the local file accumulates data worth over one HDFS block size, the client contacts the NameNode.

 5、Replication Pipelining

  When a client is writing data to an HDFS file, its data is first written to a local file as explained in the previous section. Suppose the HDFS file has a replication factor of three. When the local file accumulates a full block of user data, the client retrieves a list of DataNodes from the NameNode. This list contains the DataNodes that will host a replica of that block. The client then flushes the data block to the first DataNode. The first DataNode starts receiving the data in small portions (4 KB), writes each portion to its local repository and transfers that portion to the second DataNode in the list. The second DataNode, in turn starts receiving each portion of the data block, writes that portion to its repository and then flushes that portion to the third DataNode. Finally, the third DataNode writes the data to its local repository. Thus, a DataNode can be receiving data from the previous one in the pipeline and at the same time forwarding data to the next one in the pipeline. Thus, the data is pipelined from one DataNode to the next.

 6、File Deletes and Undeletes

  When a file is deleted by a user or an application, it is not immediately removed from HDFS. Instead, HDFS first renames it to a file in the /trashdirectory.  The file can be restored quickly as long as it remains in /trash. A file remains in /trash for a configurable amount of time. After the expiry of its life in /trash, the NameNode deletes the file from the HDFS namespace. The deletion of a file causes the blocks associated with the file to be freed. Note that there could be an appreciable time delay between the time a file is deleted by a user and the time of the corresponding increase in free space in HDFS.

  Reference:http://hadoop.apache.org/docs/r1.2.1/hdfs_design.html

HDFS Architecture Notes的更多相关文章

  1. Hadoop官方文档翻译——HDFS Architecture 2.7.3

    HDFS Architecture HDFS Architecture(HDFS 架构) Introduction(简介) Assumptions and Goals(假设和目标) Hardware ...

  2. 【转载】Hadoop官方文档翻译——HDFS Architecture 2.7.3

    HDFS Architecture HDFS Architecture(HDFS 架构) Introduction(简介) Assumptions and Goals(假设和目标) Hardware ...

  3. HDFS Architecture

    http://hadoop.apache.org/docs/r2.9.0/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html Introduction Ha ...

  4. API Management Architecture Notes

    Kong/Tyk/Zuul/strongloop/Ambassador/Gravitee IBM Reference Architecture for API Management: https:// ...

  5. HDFS 与 GFS 的设计差异

    后端分布式系列」前面关于 HDFS 的一些文章介绍了它的整体架构和一些关键部件的设计实现要点. 我们知道 HDFS 最早是根据 GFS(Google File System)的论文概念模型来设计实现的 ...

  6. HDFS 异常处理与恢复

    在前面的文章 <HDFS DataNode 设计实现解析>中我们对文件操作进行了描述,但并未展开讲述其中涉及的异常错误处理与恢复机制.本文将深入探讨 HDFS 文件操作涉及的错误处理与恢复 ...

  7. HDFS Client 设计实现解析

    前面对 HDFS NameNode 和 DataNode 的架构设计实现要点做了介绍,本文对 HDFS 最后一个主要构成组件 Client 做进一步解析. 流式读取 HDFS Client 为客户端应 ...

  8. HDFS DataNode 设计实现解析

    前文分析了 NameNode,本文进一步解析 DataNode 的设计和实现要点. 文件存储 DataNode 正如其名是负责存储文件数据的节点.HDFS 中文件的存储方式是将文件按块(block)切 ...

  9. HDFS NameNode 设计实现解析

    接前文 分布式存储-HDFS 架构解析,我们总体分析了 HDFS 架构的主要构成组件包括:NameNode.DataNode 和 Client.本文首先进一步解析 HDFS NameNode 的设计和 ...

随机推荐

  1. 【转】 linux的网络接口之扫盲

    [转] linux的网络接口之扫盲 转自:http://blog.csdn.net/zhangxinrun/article/details/6820433 (1)网络接口的命名 这里并不存在一定的命名 ...

  2. input type="file"在各个浏览器下的默认样式,以及修改自定义样式

    一.<input type="file"/>在各个浏览器中的默认样式: 系统 浏览器 样式效果 点击效果 mac google 点击按钮和输入框都可以打开文件夹 mac ...

  3. 『转』G Data InternetSecurity 2014 – 免费3个月

    G Data来自德国的顶级杀毒软件,采用BitDefender+CloseGap双引擎,屡获AV-TEST防護率100%.不多介绍,目前2014中文版没有上市.活动地址:点此进入官方网站:点此进入申请 ...

  4. cuDnn的安装ubuntu16.04环境下(tensorflow正式安装之前的必备安装操作)

    首先,下载cuDnn,地址如下: https://developer.nvidia.com/rdp/cudnn-archive 本人下载,Linux版本: 解压: tar -zxvf cudnn-8. ...

  5. python-websocket-server hacking

    /************************************************************************* * python-websocket-server ...

  6. [TopCoder14647]HiddenRabbits

    vjudge description 有一棵\(n\)个节点的树和\(m\)只兔子,每只兔子要住在一个点上(可以多只兔子住在同一个点上).有\(q\)组要求,每组形如"当以\(r\)为根时, ...

  7. Oracle单表去重复(二)

    Oracle单表去重 去重有两层含义,一:是记录完全一样.二:是符合一定条件的认为是重复. 根据表的数量,去重可划分为:单表去重和多表关联去重.   对于去重,一般最容易想到的是用distinct,而 ...

  8. SQL Server中的事务与其隔离级别之脏读, 未提交读,不可重复读和幻读

    原本打算写有关 SSIS Package 中的事务控制过程的,但是发现很多基本的概念还是需要有 SQL Server 事务和事务的隔离级别做基础铺垫.所以花了点时间,把 SQL Server 数据库中 ...

  9. CSS: body{font-size: 62.5%;}设置原因

    参考博客:http://www.cnblogs.com/daxiong/articles/2772276.html 在网页设计中我们经常看见body{font-size: 62.5%;}这样的设置,为 ...

  10. Bootstrap-CSS

    ylbtech-Bootstrap-Plugin: 1.返回顶部 1.   2. 2.返回顶部   3.返回顶部   4.返回顶部   5.返回顶部 1.   2.   11.返回顶部   作者:yl ...