SlideShare a Scribd company logo
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 ….
Q & A Thanks
Hdfs

More Related Content

What's hot

Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验
Hanborq Inc.
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
TechParty@UIC
 
浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华
zhuozhe
 
hadoop中的懒人Hive
hadoop中的懒人Hivehadoop中的懒人Hive
hadoop中的懒人Hive
chernbb
 
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 ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系
Wei-Yu Chen
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理Kay Yan
 
H base云存储
H base云存储H base云存储
H base云存储
harryren0524
 
Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威
Awei Hsu
 
redis 适用场景与实现
redis 适用场景与实现redis 适用场景与实现
redis 适用场景与实现
iammutex
 
关于Hbase
关于Hbase关于Hbase
关于Hbase
Xuewen Zhang
 
Hadoop Deployment Model @ OSDC.TW
Hadoop Deployment Model @ OSDC.TWHadoop Deployment Model @ OSDC.TW
Hadoop Deployment Model @ OSDC.TWJazz Yao-Tsung Wang
 
Spark Introduction
Spark IntroductionSpark Introduction
Spark Introduction
Kevin Zhang
 
Dfs ning
Dfs ningDfs ning
Dfs ning
Andy Shi
 
Hadoop 設定與配置
Hadoop 設定與配置Hadoop 設定與配置
Hadoop 設定與配置
鳥 藍
 
大資料分析技術的濫觴
大資料分析技術的濫觴大資料分析技術的濫觴
大資料分析技術的濫觴
家雋 莊
 
Life of Big Data Technologies
Life of Big Data TechnologiesLife of Big Data Technologies
Life of Big Data Technologies
Jazz Yao-Tsung Wang
 
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
 

What's hot (19)

Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华
 
hadoop中的懒人Hive
hadoop中的懒人Hivehadoop中的懒人Hive
hadoop中的懒人Hive
 
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 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
 
Spark Introduction
Spark IntroductionSpark Introduction
Spark Introduction
 
Dfs ning
Dfs ningDfs ning
Dfs ning
 
Hadoop 設定與配置
Hadoop 設定與配置Hadoop 設定與配置
Hadoop 設定與配置
 
大資料分析技術的濫觴
大資料分析技術的濫觴大資料分析技術的濫觴
大資料分析技術的濫觴
 
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 議題帶來的挑戰
 

Viewers also liked

Kozłowska - projekt
Kozłowska - projektKozłowska - projekt
Kozłowska - projektRobert
 
Moneda
MonedaMoneda
Moneda
Ever
 
Customer Services for Frontline Managers
Customer Services for Frontline ManagersCustomer Services for Frontline Managers
Customer Services for Frontline Managers
Dr. Muhammad Iqbal
 
투이컨설팅 제24회 Y세미나 : 설문결과
투이컨설팅 제24회 Y세미나 : 설문결과투이컨설팅 제24회 Y세미나 : 설문결과
투이컨설팅 제24회 Y세미나 : 설문결과
2econsulting
 
Cets 2013 graunke using audacity
Cets 2013 graunke using audacityCets 2013 graunke using audacity
Cets 2013 graunke using audacity
Chicago eLearning & Technology Showcase
 
CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...
CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...
CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...
Chicago eLearning & Technology Showcase
 
TiE Asia Pacific Conference 2010
TiE Asia Pacific Conference 2010TiE Asia Pacific Conference 2010
TiE Asia Pacific Conference 2010
Technopreneurs Association of Malaysia
 
C:\fakepath\milk fermentation.sekaran
C:\fakepath\milk fermentation.sekaranC:\fakepath\milk fermentation.sekaran
C:\fakepath\milk fermentation.sekaran
sekaran
 
Clinical approach to ableeding child
Clinical approach to ableeding childClinical approach to ableeding child
Clinical approach to ableeding child
Zakaria Ibrahim
 
Talsu novada Spāres bibliotēkas vēsture
Talsu novada Spāres bibliotēkas vēstureTalsu novada Spāres bibliotēkas vēsture
Talsu novada Spāres bibliotēkas vēsturebiblspare
 
Dept. of defense driving toward 0
Dept. of defense   driving toward 0Dept. of defense   driving toward 0
Dept. of defense driving toward 0
Vaibhav Patni
 
DevOps Dilemma - Make Dev work with Ops!
DevOps Dilemma - Make Dev work with Ops!DevOps Dilemma - Make Dev work with Ops!
DevOps Dilemma - Make Dev work with Ops!
Sandeep Joshi
 
Colombia exklus iva original
Colombia exklus iva originalColombia exklus iva original
Colombia exklus iva original
colombiaexclusiva
 
Power Point Tugasan 1
Power Point Tugasan 1Power Point Tugasan 1
Power Point Tugasan 1
Hamidah Samsiah
 
Even Steve Jobs has a Business Coach - Don't you want one too?
Even Steve Jobs has a Business Coach - Don't you want one too?Even Steve Jobs has a Business Coach - Don't you want one too?
Even Steve Jobs has a Business Coach - Don't you want one too?
Technopreneurs Association of Malaysia
 
How to code
How to codeHow to code
How to code
Shishir Sharma
 
Callture turnkey platform presentation
Callture turnkey platform presentationCallture turnkey platform presentation
Callture turnkey platform presentation
Callture Inc
 
Doing ICT Business in China
Doing ICT Business in ChinaDoing ICT Business in China
Doing ICT Business in China
Technopreneurs Association of Malaysia
 
2011 sponsorship invitation
2011 sponsorship invitation2011 sponsorship invitation
2011 sponsorship invitation
Prafulla Tekriwal
 

Viewers also liked (20)

Kozłowska - projekt
Kozłowska - projektKozłowska - projekt
Kozłowska - projekt
 
Moneda
MonedaMoneda
Moneda
 
Customer Services for Frontline Managers
Customer Services for Frontline ManagersCustomer Services for Frontline Managers
Customer Services for Frontline Managers
 
투이컨설팅 제24회 Y세미나 : 설문결과
투이컨설팅 제24회 Y세미나 : 설문결과투이컨설팅 제24회 Y세미나 : 설문결과
투이컨설팅 제24회 Y세미나 : 설문결과
 
Cets 2013 graunke using audacity
Cets 2013 graunke using audacityCets 2013 graunke using audacity
Cets 2013 graunke using audacity
 
CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...
CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...
CETS 2012, Greg Owen-Boger, slides for Lights, Camera…ENGAGE! Connecting with...
 
TiE Asia Pacific Conference 2010
TiE Asia Pacific Conference 2010TiE Asia Pacific Conference 2010
TiE Asia Pacific Conference 2010
 
C:\fakepath\milk fermentation.sekaran
C:\fakepath\milk fermentation.sekaranC:\fakepath\milk fermentation.sekaran
C:\fakepath\milk fermentation.sekaran
 
Clinical approach to ableeding child
Clinical approach to ableeding childClinical approach to ableeding child
Clinical approach to ableeding child
 
Talsu novada Spāres bibliotēkas vēsture
Talsu novada Spāres bibliotēkas vēstureTalsu novada Spāres bibliotēkas vēsture
Talsu novada Spāres bibliotēkas vēsture
 
Dept. of defense driving toward 0
Dept. of defense   driving toward 0Dept. of defense   driving toward 0
Dept. of defense driving toward 0
 
DevOps Dilemma - Make Dev work with Ops!
DevOps Dilemma - Make Dev work with Ops!DevOps Dilemma - Make Dev work with Ops!
DevOps Dilemma - Make Dev work with Ops!
 
Colombia exklus iva original
Colombia exklus iva originalColombia exklus iva original
Colombia exklus iva original
 
Power Point Tugasan 1
Power Point Tugasan 1Power Point Tugasan 1
Power Point Tugasan 1
 
Even Steve Jobs has a Business Coach - Don't you want one too?
Even Steve Jobs has a Business Coach - Don't you want one too?Even Steve Jobs has a Business Coach - Don't you want one too?
Even Steve Jobs has a Business Coach - Don't you want one too?
 
How to code
How to codeHow to code
How to code
 
Guangdong and Shenzhen 1
Guangdong and Shenzhen 1Guangdong and Shenzhen 1
Guangdong and Shenzhen 1
 
Callture turnkey platform presentation
Callture turnkey platform presentationCallture turnkey platform presentation
Callture turnkey platform presentation
 
Doing ICT Business in China
Doing ICT Business in ChinaDoing ICT Business in China
Doing ICT Business in China
 
2011 sponsorship invitation
2011 sponsorship invitation2011 sponsorship invitation
2011 sponsorship invitation
 

Similar to Hdfs

Hadoop-分布式数据平台
Hadoop-分布式数据平台Hadoop-分布式数据平台
Hadoop-分布式数据平台
Jacky Chi
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadooptaishanla
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadoop
taishanla
 
淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践
Min Zhou
 
Azure HDInsight 介紹
Azure HDInsight 介紹Azure HDInsight 介紹
Azure HDInsight 介紹
Herman Wu
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理airsex
 
高科技產業資料分析解決方案 Hare DB
高科技產業資料分析解決方案 Hare DB高科技產業資料分析解決方案 Hare DB
高科技產業資料分析解決方案 Hare DB
Etu Solution
 
HDInsight for Microsoft Users
HDInsight for Microsoft UsersHDInsight for Microsoft Users
HDInsight for Microsoft Users
Kuo-Chun Su
 
Bigdata introduction
Bigdata introductionBigdata introduction
Bigdata introduction
Techwiser
 
Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1YongqiangHe
 
HDInsight for Hadoopers
HDInsight for HadoopersHDInsight for Hadoopers
HDInsight for Hadoopers
Kuo-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 Suning
Alluxio, Inc.
 
Hue使用及规范
Hue使用及规范Hue使用及规范
Hue使用及规范
edwardsbean
 
Hadoop系统及其关键技术
Hadoop系统及其关键技术Hadoop系统及其关键技术
Hadoop系统及其关键技术冬 陈
 
Hdfs
HdfsHdfs
Hdfs
jiang yu
 
华为软件定义存储架构分析
华为软件定义存储架构分析华为软件定义存储架构分析
华为软件定义存储架构分析
Liang Ming
 

Similar to 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
 
华为软件定义存储架构分析
华为软件定义存储架构分析华为软件定义存储架构分析
华为软件定义存储架构分析
 

More from 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_facebook
baggioss
 
[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
 
Hic2011
Hic2011Hic2011
Hic2011
baggioss
 
Hdfs
HdfsHdfs
Hdfs
baggioss
 

More from 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