SlideShare uma empresa Scribd logo
1 de 42
HDFS原理与实现 刘景龙 liujinglong@baidu.com
概要 Peta1.0 HDFS Peta2.0
什么是Hadoop?
什么是Hadoop?
什么是HDFS? Hadoop Distributed File System Hadoop Distributed File System (HDFS) is the primary storage system used by Hadoop applications. HDFS creates multiple replicasof data blocks and distributes them on compute nodes throughout a cluster to enable reliable, extremely rapid computations.
谁在用Hadoop?
百度如何使用hadoop 半线上/线下日志挖掘 网页相关的线下大规模挖掘计算,包括linkbase的数据运算,索引库构建,网页库上的各种挖掘计算 大规模机器学习算法
百度hadoop集群现状 Hadoop集群规模1w+台节点 日平均处理数据为6PB左右 最大的hadoop集群规模:2300台
HDFS能做什么? 存储并管理PB级数据 处理非结构化数据 注重数据处理的吞吐量(latency不敏感) ,[object Object],[object Object]
设计目标 假设: 节点失效是常态 理想:  1. 任何一个节点失效,不影响HDFS服务 2. HDFS可以自动完成副本的复制
设计目标 假设: write-once-read-many存取模式 不支持文件并发写入 不支持文件修改
HDFS主要组件
HDFS主要组件的功能
系统架构
Example:HDFS如何写文件? Create file  Close file Write packet Send ack Write packet Send ack Write packet Send ack
HDFS副本放置策略
Example:HDFS如何读文件? Open file Get block location Close file Read block
节点失效是常态 DataNode中的磁盘挂了怎么办? DataNode所在机器挂了怎么办? NameNode挂了怎么办? Client挂了怎么办?
DataNode的磁盘挂了怎么办? DataNode正常服务 坏掉的磁盘上的数据尽快通知NameNode
DataNode所在机器挂了怎么办? 问:NameNode怎么知道DataNode挂掉了? 答:datanode每3秒钟向namenode发送心跳,如果10分钟datanode没有向namenode发送心跳,则namenode认为该datanode已经dead,namenode将取出该datanode上对应的block,对其进行复制。
NameNode挂了怎么办? 持久化元数据 操作日志(edit log) 记录文件创建,删除,修改文件属性等操作 Fsimage 包含完整的命名空间 File -> Block的映射关系 文件的属性(ACL, quota, 修改时间等)
NameNode挂了怎么办? Secondary NameNode 将NameNode的fsimage与edit log从Namenode复制到临时目录 将fsimage同edit log合并,并产生新的fsimage 将产生的新的fsimage上传给NameNode 清除NameNode中的edit log [注]: Secondary NameNode仅仅对NameNode中元数据提供冷备方案
Client挂了怎么办? 问: Client 所在机器挂了有什么影响? 答:一致性问题 Lease recovery Create file, get lease  Crash Renew lease
write-once-read-many 读写流程 不支持并发写入 通过lease机制 不支持对文件修改
小结 什么是hadoop hdfs是用来做什么的 hdfs的主要假设是什么? hdfs针对假设做了些什么?
思考题 现有hdfs架构上存在的问题是什么?
HDFS -> Peta1.0 可扩展性
HDFS -> Peta1.0 可扩展性
HDFS -> Peta1.0 可扩展性 Bung
可扩展性 问题: 集群规模扩大:1000 -> 5000/10000 数据规模的增长: 1亿-> 5亿/10亿 单点的Master/NameNode内存,所有的元数据都存储于NameNode的内存 负载,集群规模扩大后,单点的NameNode请求压力也会同时增大
可扩展性 设计目标: 文件支撑到1万节点、10亿文件的集群规模
可扩展性
可扩展性 Namespace /home/test/1.txt  -> pool : 10 file id: 1000 /home/test/2.txt  -> pool : 84 file id: 3000 fms1 fms2 fms3 /10-1000  r2 {1, 3} … /84-3000  r3 {2, 4, 5} …
可扩展性
Peta1.0 -> Peta2.0 可用性 Namenode单点失效 crash
可用性 设计目标: 最差情况下,5分钟完成fail over
可用性
后续工作
I want to try ….
Contact us Dpf-help@baidu.com 百度群: 1199411 百度hadoop平台:       dpfhelp.dmop.baidu.com
Q & A Thanks
Hdfs

Mais conteúdo relacionado

Mais procurados

Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验Hanborq Inc.
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to HadoopTechParty@UIC
 
浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华zhuozhe
 
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹Anna Yen
 
hadoop中的懒人Hive
hadoop中的懒人Hivehadoop中的懒人Hive
hadoop中的懒人Hivechernbb
 
Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系Wei-Yu Chen
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理Kay Yan
 
Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威Awei Hsu
 
redis 适用场景与实现
redis 适用场景与实现redis 适用场景与实现
redis 适用场景与实现iammutex
 
Hadoop Deployment Model @ OSDC.TW
Hadoop Deployment Model @ OSDC.TWHadoop Deployment Model @ OSDC.TW
Hadoop Deployment Model @ OSDC.TWJazz Yao-Tsung Wang
 
Hadoop 設定與配置
Hadoop 設定與配置Hadoop 設定與配置
Hadoop 設定與配置鳥 藍
 
Spark Introduction
Spark IntroductionSpark Introduction
Spark IntroductionKevin Zhang
 
大資料分析技術的濫觴
大資料分析技術的濫觴大資料分析技術的濫觴
大資料分析技術的濫觴家雋 莊
 
Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰
Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰
Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰Ching-Lin Tao
 

Mais procurados (19)

Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华
 
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
 
hadoop中的懒人Hive
hadoop中的懒人Hivehadoop中的懒人Hive
hadoop中的懒人Hive
 
大數據
大數據大數據
大數據
 
Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理
 
H base云存储
H base云存储H base云存储
H base云存储
 
Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威
 
redis 适用场景与实现
redis 适用场景与实现redis 适用场景与实现
redis 适用场景与实现
 
关于Hbase
关于Hbase关于Hbase
关于Hbase
 
Hadoop Deployment Model @ OSDC.TW
Hadoop Deployment Model @ OSDC.TWHadoop Deployment Model @ OSDC.TW
Hadoop Deployment Model @ OSDC.TW
 
Hadoop 設定與配置
Hadoop 設定與配置Hadoop 設定與配置
Hadoop 設定與配置
 
Dfs ning
Dfs ningDfs ning
Dfs ning
 
Spark Introduction
Spark IntroductionSpark Introduction
Spark Introduction
 
大資料分析技術的濫觴
大資料分析技術的濫觴大資料分析技術的濫觴
大資料分析技術的濫觴
 
Life of Big Data Technologies
Life of Big Data TechnologiesLife of Big Data Technologies
Life of Big Data Technologies
 
Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰
Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰
Big data, big challenge- splunk 幫你解決 big data 議題帶來的挑戰
 

Destaque

5Q Communications - Top 10 Tips for Effective Web Ministry
5Q Communications - Top 10 Tips for Effective Web Ministry5Q Communications - Top 10 Tips for Effective Web Ministry
5Q Communications - Top 10 Tips for Effective Web MinistryFive Q
 
Development of the Logistics Sector in the United States: Past, Present and F...
Development of the Logistics Sector in the United States: Past, Present and F...Development of the Logistics Sector in the United States: Past, Present and F...
Development of the Logistics Sector in the United States: Past, Present and F...Technopreneurs Association of Malaysia
 
Tech 2.0: Tech Tips to Boost Office Productivity
Tech 2.0: Tech Tips to Boost Office ProductivityTech 2.0: Tech Tips to Boost Office Productivity
Tech 2.0: Tech Tips to Boost Office ProductivityJohn Chen
 
Music : your social media optimisation
Music : your social media optimisationMusic : your social media optimisation
Music : your social media optimisationaf83media
 
Getting Results With Usability Testing (5Q GROK Webinar Series)
Getting Results With Usability Testing (5Q GROK Webinar Series)Getting Results With Usability Testing (5Q GROK Webinar Series)
Getting Results With Usability Testing (5Q GROK Webinar Series)Five Q
 
C:\fakepath\pavasaris steidzite
C:\fakepath\pavasaris steidziteC:\fakepath\pavasaris steidzite
C:\fakepath\pavasaris steidzitepopesbiblioteka
 
Prezentācija1_MD
Prezentācija1_MDPrezentācija1_MD
Prezentācija1_MDGalenubibl
 
Early postoperative com
Early postoperative comEarly postoperative com
Early postoperative comNgô Định
 
C:\fakepath\Impact of tsunami on soil properties
C:\fakepath\Impact of tsunami on soil propertiesC:\fakepath\Impact of tsunami on soil properties
C:\fakepath\Impact of tsunami on soil propertiessekaran
 
Reporte coordinacion municipal de atencion a la juventud comajuve
Reporte coordinacion municipal de atencion a la juventud comajuveReporte coordinacion municipal de atencion a la juventud comajuve
Reporte coordinacion municipal de atencion a la juventud comajuveevilchucky
 
Course plan os
Course plan   osCourse plan   os
Course plan osrupalidhir
 

Destaque (20)

5Q Communications - Top 10 Tips for Effective Web Ministry
5Q Communications - Top 10 Tips for Effective Web Ministry5Q Communications - Top 10 Tips for Effective Web Ministry
5Q Communications - Top 10 Tips for Effective Web Ministry
 
Product Market Study - ICT in China (2011)
Product Market Study - ICT in China (2011)Product Market Study - ICT in China (2011)
Product Market Study - ICT in China (2011)
 
CETS2010, Nancy Munro & Allison Black, From Addie to Improv
CETS2010, Nancy Munro & Allison Black, From Addie to ImprovCETS2010, Nancy Munro & Allison Black, From Addie to Improv
CETS2010, Nancy Munro & Allison Black, From Addie to Improv
 
Unit 7 lesson d
Unit 7  lesson dUnit 7  lesson d
Unit 7 lesson d
 
Development of the Logistics Sector in the United States: Past, Present and F...
Development of the Logistics Sector in the United States: Past, Present and F...Development of the Logistics Sector in the United States: Past, Present and F...
Development of the Logistics Sector in the United States: Past, Present and F...
 
Tech 2.0: Tech Tips to Boost Office Productivity
Tech 2.0: Tech Tips to Boost Office ProductivityTech 2.0: Tech Tips to Boost Office Productivity
Tech 2.0: Tech Tips to Boost Office Productivity
 
Guangdong and Shenzhen 1
Guangdong and Shenzhen 1Guangdong and Shenzhen 1
Guangdong and Shenzhen 1
 
Music : your social media optimisation
Music : your social media optimisationMusic : your social media optimisation
Music : your social media optimisation
 
Detailed Cv
Detailed CvDetailed Cv
Detailed Cv
 
Oii 1 intro
Oii 1 introOii 1 intro
Oii 1 intro
 
Getting Results With Usability Testing (5Q GROK Webinar Series)
Getting Results With Usability Testing (5Q GROK Webinar Series)Getting Results With Usability Testing (5Q GROK Webinar Series)
Getting Results With Usability Testing (5Q GROK Webinar Series)
 
C:\fakepath\pavasaris steidzite
C:\fakepath\pavasaris steidziteC:\fakepath\pavasaris steidzite
C:\fakepath\pavasaris steidzite
 
Prezentācija1_MD
Prezentācija1_MDPrezentācija1_MD
Prezentācija1_MD
 
TeAM Women Book snapshot
TeAM Women Book snapshotTeAM Women Book snapshot
TeAM Women Book snapshot
 
Early postoperative com
Early postoperative comEarly postoperative com
Early postoperative com
 
C:\fakepath\Impact of tsunami on soil properties
C:\fakepath\Impact of tsunami on soil propertiesC:\fakepath\Impact of tsunami on soil properties
C:\fakepath\Impact of tsunami on soil properties
 
Reporte coordinacion municipal de atencion a la juventud comajuve
Reporte coordinacion municipal de atencion a la juventud comajuveReporte coordinacion municipal de atencion a la juventud comajuve
Reporte coordinacion municipal de atencion a la juventud comajuve
 
CWorks case study
CWorks case studyCWorks case study
CWorks case study
 
Course plan os
Course plan   osCourse plan   os
Course plan os
 
Cross countries analysis
Cross countries analysisCross countries analysis
Cross countries analysis
 

Semelhante a Hdfs

Hadoop-分布式数据平台
Hadoop-分布式数据平台Hadoop-分布式数据平台
Hadoop-分布式数据平台Jacky Chi
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadooptaishanla
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadooptaishanla
 
淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践Min Zhou
 
Azure HDInsight 介紹
Azure HDInsight 介紹Azure HDInsight 介紹
Azure HDInsight 介紹Herman Wu
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理airsex
 
高科技產業資料分析解決方案 Hare DB
高科技產業資料分析解決方案 Hare DB高科技產業資料分析解決方案 Hare DB
高科技產業資料分析解決方案 Hare DBEtu Solution
 
HDInsight for Microsoft Users
HDInsight for Microsoft UsersHDInsight for Microsoft Users
HDInsight for Microsoft UsersKuo-Chun Su
 
Bigdata introduction
Bigdata introductionBigdata introduction
Bigdata introductionTechwiser
 
Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1YongqiangHe
 
HDInsight for Hadoopers
HDInsight for HadoopersHDInsight for Hadoopers
HDInsight for HadoopersKuo-Chun Su
 
Track A-1: Cloudera 大數據產品和技術最前沿資訊報告
Track A-1: Cloudera 大數據產品和技術最前沿資訊報告Track A-1: Cloudera 大數據產品和技術最前沿資訊報告
Track A-1: Cloudera 大數據產品和技術最前沿資訊報告Etu Solution
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introductionTianwei Liu
 
Use Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in SuningUse Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in SuningAlluxio, Inc.
 
Hue使用及规范
Hue使用及规范Hue使用及规范
Hue使用及规范edwardsbean
 
Hadoop系统及其关键技术
Hadoop系统及其关键技术Hadoop系统及其关键技术
Hadoop系统及其关键技术冬 陈
 
华为软件定义存储架构分析
华为软件定义存储架构分析华为软件定义存储架构分析
华为软件定义存储架构分析Liang Ming
 

Semelhante a Hdfs (20)

Hadoop-分布式数据平台
Hadoop-分布式数据平台Hadoop-分布式数据平台
Hadoop-分布式数据平台
 
Hadoop
HadoopHadoop
Hadoop
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadoop
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadoop
 
淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践
 
Azure HDInsight 介紹
Azure HDInsight 介紹Azure HDInsight 介紹
Azure HDInsight 介紹
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理
 
IT03
IT03IT03
IT03
 
高科技產業資料分析解決方案 Hare DB
高科技產業資料分析解決方案 Hare DB高科技產業資料分析解決方案 Hare DB
高科技產業資料分析解決方案 Hare DB
 
HDInsight for Microsoft Users
HDInsight for Microsoft UsersHDInsight for Microsoft Users
HDInsight for Microsoft Users
 
Bigdata introduction
Bigdata introductionBigdata introduction
Bigdata introduction
 
Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1
 
HDInsight for Hadoopers
HDInsight for HadoopersHDInsight for Hadoopers
HDInsight for Hadoopers
 
Track A-1: Cloudera 大數據產品和技術最前沿資訊報告
Track A-1: Cloudera 大數據產品和技術最前沿資訊報告Track A-1: Cloudera 大數據產品和技術最前沿資訊報告
Track A-1: Cloudera 大數據產品和技術最前沿資訊報告
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
Use Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in SuningUse Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in Suning
 
Hue使用及规范
Hue使用及规范Hue使用及规范
Hue使用及规范
 
Hadoop系统及其关键技术
Hadoop系统及其关键技术Hadoop系统及其关键技术
Hadoop系统及其关键技术
 
Hdfs
HdfsHdfs
Hdfs
 
华为软件定义存储架构分析
华为软件定义存储架构分析华为软件定义存储架构分析
华为软件定义存储架构分析
 

Mais de baggioss

Hdfs写流程异常处理
Hdfs写流程异常处理Hdfs写流程异常处理
Hdfs写流程异常处理baggioss
 
Hbase性能测试文档
Hbase性能测试文档Hbase性能测试文档
Hbase性能测试文档baggioss
 
Hbase使用hadoop分析
Hbase使用hadoop分析Hbase使用hadoop分析
Hbase使用hadoop分析baggioss
 
Hadoop基线选定
Hadoop基线选定Hadoop基线选定
Hadoop基线选定baggioss
 
Hic 2011 realtime_analytics_at_facebook
Hic 2011 realtime_analytics_at_facebookHic 2011 realtime_analytics_at_facebook
Hic 2011 realtime_analytics_at_facebookbaggioss
 
[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)baggioss
 

Mais de baggioss (9)

Hdfs写流程异常处理
Hdfs写流程异常处理Hdfs写流程异常处理
Hdfs写流程异常处理
 
Hbase性能测试文档
Hbase性能测试文档Hbase性能测试文档
Hbase性能测试文档
 
Hbase使用hadoop分析
Hbase使用hadoop分析Hbase使用hadoop分析
Hbase使用hadoop分析
 
Hadoop基线选定
Hadoop基线选定Hadoop基线选定
Hadoop基线选定
 
Hic 2011 realtime_analytics_at_facebook
Hic 2011 realtime_analytics_at_facebookHic 2011 realtime_analytics_at_facebook
Hic 2011 realtime_analytics_at_facebook
 
[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)
 
Hic2011
Hic2011Hic2011
Hic2011
 
Hbase
HbaseHbase
Hbase
 
Hdfs
HdfsHdfs
Hdfs
 

Hdfs