Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
spark shuffle 勉強会
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
huydx
March 18, 2016
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
spark shuffle 勉強会
spark shuffle 勉強会
huydx
March 18, 2016
Transcript
7 slides
SparkͷShuffleपΓ @huydx
Shuffleʹ͍ͭͯ • Map - Reduce Ϟσϧ • Mapஈ֊͔ΒReduceஈ֊ͷதؒϨΠϠʔ ʮShuffleʯͱݺͿ •
ShuffleͰ • Spark͕PullϞσϧʢ·ͣσΟεΫʹ݁Ռॻ͍ ͯɺReduceδϣϒ͕औΓʹߦ͘ʣ • SparkReduceδϣϒʹඞཁͳσʔλϝϞϦ ϑΟοτ͠ͳ͍ͱ͍͚ͳ͍
͍ͭShuffle͕ൃੜ͢Δ • Join • Cogroup • *ByKeyΦϖϨʔγϣϯ
Shuffleͷ • ShuffleϑΝΠϧ • Mapͷ͕MɺReduceͷ͕Rͱͨ͠ΒσΟεΫʹॻ͘ ϑΝΠϧ͕ M * R (M
= 5000, R = 1024 ͩͱ 500ສϑΝ Πϧʂʣ • Reduce͢Δͱ͖ʹιʔτΞϧΰϦζϜ͕ඞཁ • ฒྻʹιʔτ͢Δඞཁ͕Ͱ͖Δͷ • ௨৴͕ॏ͍
Shuffleͷղܾ • ShuffleϑΝΠϧɿ • O(M * R) ͡Όͳͯ͘ O(R)·Ͱ͑ΒΕΔ •
Hashed base shuffle(ҰͭͷRͻͱͭͷϑΝΠϧʣ͡Όͳͯ͘ Sort base shuffle • ࢀߟɿhttps://issues.apache.org/jira/secure/attachment/ 12637642/Consolidating%20Shuffle%20Files%20in %20Spark.pdf • https://issues.apache.org/jira/browse/SPARK-2045
Shuffleͷղܾ • SortͷΞϧΰϦζϜબ • https://databricks.com/blog/2014/10/10/spark- petabyte-sort.html • TimsortΛ࣮͢Δ • ৭ʑͳιʔτΞϧΰϦζϜͷΉ߹ΘͤͰฏ
ۉWorst CaseύʔϑΥϚϯεΛݮΒ͢
Shuffleͷղܾ • ωοτϫʔΫϞδϡʔϧΛվળ • https://issues.apache.org/jira/browse/ SPARK-2468 • Netty ϕʔεσʔλసૹͷ࣮ (FileChannel.transferToͰzero
copyʣ
More Decks by huydx
See All by huydx
Finagle もろもろ
huydx
0
2.3k
web audio api (htmlday osaka)
huydx
1
1.2k
Other Decks in Programming
See All in Programming
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
Promiseの向こう側へコンテキストを届ける ― proposal-async-context
seriseri
0
440
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
280
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
240
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
110
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
850
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
230
AppFunctionsの内部実装を紐解く
hiroaki404
1
120
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
220
Featured
See All Featured
Navigating Team Friction
lara
192
16k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
The Language of Interfaces
destraynor
163
27k
Writing Fast Ruby
sferik
630
63k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
4k
The SEO identity crisis: Don't let AI make you average
varn
0
630
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Unsuck your backbone
ammeep
672
58k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Practical Orchestrator
shlominoach
192
12k