GFS Key Components

  • components failures are a norm
  • even space utilisation
  • write-once-read-many

GFS and Hadoop Distributed File System


GFS主要分为:Application 、Master、ChannelServer
hdfs主要分为:Appllcation 、 NameNode 、DataNode三部分

how to read file from hdfs


HDFS client 运行在client node 上的client jvm上。

读取文件的流程

  1. 打开分布式文件系统上的文件
  2. 从NameNode处取的文件块的位置
  3. HDFS client将块位置信息传给FSDataInputStream
  4. FSDataInputStream再从相应的DataNode里面读取其中一个块数据
  5. FSDataInputStream再从相应的DataNode里面读取另一个块数据
  6. 关闭FSDataInputStream

写入文件的流程


hdfs client 运行在client jvm上,client jvm运行在client jvm上。
写入文件的流程:
1. HDFS client 在Distributed FileSystem上创建文件
2. DistributedFileSystem 在NameNode上create一个文件
3. HDFS client 通过FSDataInputStream向datanode发送write packet
4. 至少三个datanode组成Pipeline of datanodes写入多个副本
5. datanode向FSDataInpuStream发送ack packet
6. 关闭

In DFS,you can “append” into file,but cannot “modify” a file in the middle. Why?
DFS的核心特性write once read many time 描述了一种数据存储策略。信息一旦写入就不能修改,因为修改操作需要对对底层的存储结构进行修改。如果需要修改分布式文件系统(例如hdfs)中的文件,可以写一份新的同样文件名的数据。旧的文件在hdfs在整理数据的时候会丢弃。

HDFS应用需要一个“一次写入多次读取”的文件访问模型。一个文件经过创建、写入和关闭之后就不需要改变。这一假设简化了数据一致性问题,并且使高吞吐量的数据访问成为可能。Map/Reduce应用或者网络爬虫应用都非常适合这个模型。目前还有计划在将来扩充这个模型,使之支持文件的附加写操作。

Yandex Big Data Essentials Week1 Scaling Distributed File System的更多相关文章

  1. Yandex Big Data Essentials Week1 Unix Command Line Interface File System exploration

    File System Function In computing, a file system or filesystem is used to control how data is stored ...

  2. Yandex Big Data Essentials Week1 Unix Command Line Interface Processes managing

    free displays the total amount of free and used memory free [options] top provides a dynamic real-ti ...

  3. Yandex Big Data Essentials Week1 Unix Command Line Interface File Content exploration

    cat displays the contents of a file at the command line copies or apppend text file into a document ...

  4. HDFS分布式文件系统(The Hadoop Distributed File System)

    The Hadoop Distributed File System (HDFS) is designed to store very large data sets reliably, and to ...

  5. HDFS(Hadoop Distributed File System )

    HDFS(Hadoop Distributed File System ) HDFS(Hadoop Distributed File System )Hadoop分布式文件系统.是根据google发表 ...

  6. 5105 pa3 Distributed File System based on Quorum Protocol

    1 Design document 1.1 System overview We implemented a distributed file system using a quorum based ...

  7. Ceph: A Scalable, High-Performance Distributed File System译文

    原文地址:陈晓csdn博客 http://blog.csdn.net/juvxiao/article/details/39495037 论文概况 论文名称:Ceph: A Scalable, High ...

  8. Hadoop ->> HDFS(Hadoop Distributed File System)

    HDFS全称是Hadoop Distributed File System.作为分布式文件系统,具有高容错性的特点.它放宽了POSIX对于操作系统接口的要求,可以直接以流(Stream)的形式访问文件 ...

  9. HDFS(Hadoop Distributed File System )hadoop分布式文件系统。

    HDFS(Hadoop Distributed File System )hadoop分布式文件系统.HDFS有如下特点:保存多个副本,且提供容错机制,副本丢失或宕机自动恢复.默认存3份.运行在廉价的 ...

随机推荐

  1. Docker系列-第五篇Docker容器数据卷

    1.是什么 在生产环境中使用 Docker,往往需要对数据进行持久化,或者需要在多个容器之间进行数据共享,这必然涉及容器的数据管理操作 . 容器中的管理数据主要有两种方式 : 数据卷 ( Data V ...

  2. 史上最详细的VMware 安装CentOS 7

    1.点击"创建新的虚拟机": ![file](https://img2018.cnblogs.com/blog/209997/202001/209997-2020011723572 ...

  3. 沈阳网络赛 F - 上下界网络流

    "Oh, There is a bipartite graph.""Make it Fantastic." X wants to check whether a ...

  4. vue学习笔记2:藕断丝连的 v-show 和 v-if

    一.知识点 vue指令 v-show v-if 二.代码案例 v-show <div v-show="isShow">动态显示或隐藏</div> <! ...

  5. 大厂面试中三次握手延伸出来n连发你受得了?

    目录 一.这是一次有故事的对话 二.三次握手的客户端服务端状态 1 先画个图看看有哪些状态 2 tcp协议内容解析 3 通过工具wireshark来验证我们所述 三.说下Linux网络编程常用API ...

  6. eclipse git导入的项目 让修改后的文件带有黑色星标记样式

    操作方式:Window——>Preferences——>Team——>Git——>Label Decorations——>Icon Decorations 将 Dirty ...

  7. idea中当前模块资源目录上显示属于其他模块

    一.错误的2个显示 1.错误显示 src/main目录下的java和resources本来属于cloud-consumer-dept-feign模块 但是在src/main/java却是显示src/m ...

  8. 玩转Django2.0---Django笔记建站基础九(一)(Auth认证系统)

    第九章 Auth认证系统 Django除了有强大的Admin管理系统之外,还提供了完善的用户管理系统.整个用户管理系统可分为三大部分:用户信息.用户权限和用户组,在数据库中分别对应数据表auth_us ...

  9. 20191212模拟赛 问题B

    题目: 分析: 上来看到k=2,... SB杜教筛phi 有点感冒,这把养生一点... 于是写了55分走人了.. 下来一看挺简单的啊2333 不考虑gcd时,构造数列的方案为C(N+K-1,K) 考虑 ...

  10. html恶搞之无限弹窗

    啦啦啦啦啦 恶搞别人吗? 把下面代码做成html文件发给别人,用浏览器打开就可以看见效果了 <!DOCTYPE html> <html><head><meta ...