$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HDFS RAID
Search
jiangbo
December 21, 2012
Programming
0
3.9k
HDFS RAID
an introduction of HDFS RAID
jiangbo
December 21, 2012
Tweet
Share
More Decks by jiangbo
See All by jiangbo
HDFS
jiangbo
0
190
Memcached内存管理
jiangbo
1
1.6k
awk
jiangbo
4
310
vim
jiangbo
8
500
Other Decks in Programming
See All in Programming
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
1
170
これならできる!個人開発のすゝめ
tinykitten
PRO
0
120
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
760
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
8
1.7k
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
100
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.3k
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
350
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
330
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
190
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.1k
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
130
Developing static sites with Ruby
okuramasafumi
0
310
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
44
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
140
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
120
Making the Leap to Tech Lead
cromwellryan
135
9.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
It's Worth the Effort
3n
187
29k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
120
Writing Fast Ruby
sferik
630
62k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
200
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
21
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Transcript
HDFS RAID ᇙത Friday, December 21, 12
Outline • Overview • Some detail • How to use
Friday, December 21, 12
Why? • $$$$$......and $$$$$.... Friday, December 21, 12
How? • 䫩খ෭ຊ+҆શੑෆ߱=Erasred Code Friday, December 21, 12
Overview Friday, December 21, 12
DRFS • ༻Raidम䐾ޭೳแྃHDFSతDFS • 读औHDFSதblockਾੋ发ੜ CorruptionException҃DecomissionException时 ࠜਾparityจ݅对䇗ৗblock进ߦम䐾 Friday, December 21,
12
RaidShell • ҰClientཧ۩ɼఏڙraidFileɼunraidɼ fixBlock, checkStatusޭೳ • ௨过RPC请ٻRaidNodeɼNN节发ى请ٻ Friday, December 21,
12
RaidNode • DRFSதআNNɼJT֎ୈࡾMaster • 维护Ұ组తdaemon线ఔɼࠜਾ༻户ఏަతraid 请ٻʢraid policyʣraidɼfixɼpurge֤㜎 ૢ࡞ Friday, December
21, 12
Threads on RaidNode • TriggerMonitorɿ֩৺线ఔɼࠜਾpolicyஔ调raid • BlockFixerɿम䐾corruptจ݅తworker线ఔ • BlockCopierɿम䐾decomissionจ݅తworker线ఔ •
PurgeParityThreadɿਗ਼ཧݽၰparityจ݅త线ఔ • PlacementThreadɿࢄdatanode্过ूதతparity blockత线ఔ • HarThreadɿক过ظతparity进ߦharҎ䫩গparityจ݅త线ఔ Friday, December 21, 12
Some detail • raid file • fix file Friday, December
21, 12
Raid File • hadoop raidshell -raidFile /path • TriggerMonitor Friday,
December 21, 12
Friday, December 21, 12
RaidNode.doRaid Friday, December 21, 12
Encode Friday, December 21, 12
Erasred Code • RS: 10:4 • XOR: 10:1 Friday, December
21, 12
Fix File • DRFS readั获䇗ৗ • BlockIntegrityMonitor检查౸䇗ৗจ݅ Friday, December 21,
12
DRFS read Friday, December 21, 12
BlockIntegrityMonitro • local • dist • sorry...图ྃ... Friday, December 21,
12
Local LocalBlockIntegrity线ఔత֩৺ੋपظ调༻doFixํ๏म䐾corruptจ݅ɼओཁ ྲྀఔԼɿ 1. ௨过DFSck获औcurrputจ݅৴ଉʢHTTP访问ʣ 2. 过滤ᎃෆೳ伭䐾తcorruptจ݅ʢ༗parityจ݅తʣ 3. কcorrputతจ݅ഉংɼഉং规则Լ ◦
parityจ݅优ઌɼsourceจ݅ࡏ ◦ parityจ݅தcodec.priorityߴతࡏઌʢcodec.priority௨过JSONத coder_priorityஔʣ 4. 对ഉং߸తcorruptจ݅ྻදґ࣍௨过BlockRecontsturerདྷ伭䐾ɻ Friday, December 21, 12
Dist 1. 检查લਖ਼ࡏ运ߦతम䐾jobɼՌલjobቮ经େဋjob্ݶɼ则೭લత job运ߦʢ该্线ՄҎ௨过raid.blockfix.maxpendingjobsདྷஔɼᘍ认ੋ100Lʣ 2. ௨过DFSck获औ损ᆀతจ݅৴ଉɼblockfixer线ఔ获औcorruptจ݅৴ଉɼ blockCopier获औdecomissionจ݅৴ଉ 3. 计ࢉ获ಘత损ᆀจ݅త优ઌ级 4.
ক计ࢉ优ઌ级తจ݅ྻද҈优ઌ级ഉংɼ࡞为ࢀ构ݐम䐾Jobɻ 5. Jobత输ೖੋॴ༗धཁम䐾తจ݅pathతsequence fileɻձࠜਾ raid.blockfix.filespertaskஔత值进ߦsyncɼଈࡏjobతsplit阶ஈձ҈র该值设ஔ త进ߦsplitɼᘍ认ੋ20 6. JobతMapperओཁੋ௨过Reconstruterࡏtaskص্㠳应จ݅త伭䐾ɻ Friday, December 21, 12
优ઌ级计ࢉ 1. corrputจ݅త优ઌ级Լ(R为จ݅෭ຊɼC为该จ݅corrputత block)ɿ ◦ ᘍ认为LOW ◦ R>1 && C>0时ɿ
HIGH ◦ R==1 && C>1时ɿ HIGH ◦ parityfile corrput && C>0时ɿ HIGH 2. decomission优ઌ级计ࢉ规则ԼʢD为decomissionతblock): ◦ ᘍ认为LOW ◦ D>4时ɿ HIGH Friday, December 21, 12
BlockReconstructor • BlockIntegrityMonitorRaidShell对จ݅తम䐾࠷终௨过 BlockReconstructorདྷɻ • BlockReconstructorम䐾จ݅过ఔओཁ为ࡾ㜎ɿHar parityจ݅ɼparity จ݅ݯਾจ݅ɻ Friday, December
21, 12
Har parity file 1. 获औharจ݅తجຊ৴ଉٴindex 2. 获औharจ݅தతlost blockɼ对㑌block进ߦԼ处ཧɿ 3. ࡏຊจ݅ܥ统创ݐ该blockత临时จ݅ɼ
4. 对该block㐪ٴతॴ༗parityจ݅ɼ获औ对应తsourceจ݅ɼ௨过 Encoderॏ৽encodeɼࡏຊੜparityɻ 5. কຊੜతblockਾ发ૹ౸Ұdatanode্ɼdatanodeత选औ 规则ੋဓू܈தআݪblockॴଐ节֎ਵص选औҰɻ发ૹ过ఔಉ 时ੜblockతmetaจ݅ɻ Friday, December 21, 12
Parity File parityจ݅తम䐾处ཧ૬对简单ɿ 1. ࡏຊ࣍创ݐlost blockత临时จ݅ 2. 获औparityจ݅తݯจ݅ɼ௨过Encoderॏ৽encodeɼࡏຊ ੜparityจ݅తblock 3.
选औҰdnʢ选औ规则har parityจ݅म䐾Ұகʣɼক blockਾ发ૹ౸该dn্ɼኂಉ时ੜmetaจ݅ Friday, December 21, 12
ਾจ݅ ݯจ݅త伭䐾༩parityจ݅తम䐾૬ɼੋҰdecode过ఔɿ 1. 对ဋfileத丢ࣦత㑌block执ߦम䐾ૢ࡞ 2. ࡏຊ创ݐblockత临时จ݅ 3. ௨过Decoder伭䐾blockਾ 4. 选औҰtarget
dnɼকblockਾ发ૹ给target dnɼኂಉ时ੜmeta จ݅ɻ Friday, December 21, 12
Decoder Friday, December 21, 12
How to use http://wiki.aliyun-inc.com/projects/apsara/wiki/Yunti1/HDFS-Raid-deploy http://wiki.apache.org/hadoop/HDFS-RAID Friday, December 21, 12
Ұ问题 • େྔจ݅ڊܕจ݅తraid Friday, December 21, 12
Resouces http://wiki.apache.org/hadoop/HDFS-RAID http://hadoopblog.blogspot.com/2009/08/hdfs-and-erasure-codes-hdfs-raid.html http://jiangbo.me/blog/2012/12/21/hdfs-raid/ Friday, December 21, 12
THX Friday, December 21, 12