Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AirflowからKuroko2に乗り換えたわけ
Search
hatappi
May 16, 2017
Technology
0
780
AirflowからKuroko2に乗り換えたわけ
Tokyo Airflow Meetup #1
hatappi
May 16, 2017
Tweet
Share
More Decks by hatappi
See All by hatappi
RubyではじめるGraphQL
hatappi
0
780
RubyでChainerつくってます!!
hatappi
2
1.3k
TDDな個人開発
hatappi
0
260
できるだけ楽して楽しくRails開発しよう
hatappi
2
300
EKSにRailsをのせた
hatappi
1
1.1k
RubyとApache Arrow
hatappi
0
2.2k
Red Chainerを なぜ作って今後どうするのか
hatappi
2
2.2k
Fargateで夢は見られるのか
hatappi
1
2k
個人サービスをFargateに移行したよ
hatappi
1
620
Other Decks in Technology
See All in Technology
お悩みハンドブック紹介資料
grafferhandbook
0
940
[GDG DevFest Bangkok 2024] - The Future of Retail E-commerce with Gemini AI
punsiriboo
0
300
Atelier BlueHats : Migration de l’application COBOL MedocDB de GCOS à GnuCOBOL sur GNU/Linux
bluehats
0
120
論理レプリケーションを使ったDB統合
kkato1
0
200
Autonomous Database サービス・アップデート (FY25)
oracle4engineer
PRO
0
240
AWS re:Invent 2024登壇資料(GBL206-JA: Unleashing the power of generative AI on AWS for your business)
minorun365
PRO
5
200
MediaPipe と ML Kit ってどう ちがうの? / What is the difference between MediaPipe and ML Kit?
yanzm
0
490
Oracle Cloud Infrastructure:2024年11月度サービス・アップデート
oracle4engineer
PRO
0
190
密着! Bedrockerがre:Invent 2024で過ごした5日間を紹介
minorun365
PRO
3
130
AWS認定試験の長文問題を早く解くコツ
keke1234ke
0
160
A/Aテストにおけるサンプルサイズ/japanr2024
nikkei_engineer_recruiting
1
490
Raspberry Pi 秋の新製品をチェックしてみよう / 20231202-rpi-jam-tokyo
akkiesoft
0
380
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
410
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
880
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
15
Optimizing for Happiness
mojombo
376
70k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
160
BBQ
matthewcrist
85
9.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
480
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
27
2.1k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.8k
Producing Creativity
orderedlist
PRO
341
39k
Code Reviewing Like a Champion
maltzj
520
39k
Transcript
Airflow͔ΒKuroko2 ʹΓ͑ͨΘ͚ by hatappi @Tokyo Airflow Meetup #1 1
࣍ • ࣗݾհ • AirflowͷಋೖܦҢ • AirflowΛӡ༻ͯ͠Έͯ • Kuroko2Λͳ͍ͥ͡Ίͨͷ͔ •
·ͱΊ 2
࣍ • ࣗݾհ • AirflowͷಋೖܦҢ • AirflowΛӡ༻ͯ͠Έͯ • Kuroko2Λͳ͍ͥ͡Ίͨͷ͔ •
·ͱΊ 3
ࣗݾհ • ໊લ: ാத༔࡞ • ID: hatappi • ձࣾ: גࣜձࣾSpeee
• ͍ͬͯΔ͜ͱ • UZOU • Angular + RailsͰ࡞͢Δސ٬ཧγεςϜ 4
࣍ • ࣗݾհ • AirflowͷಋೖܦҢ • AirflowΛӡ༻ͯ͠Έͯ • Kuroko2Λͳ͍ͥ͡Ίͨͷ͔ •
·ͱΊ 5
AirflowΛ͍ΕΔલ 6 ఆظతʹόονΛ࣮ߦ͍ͨ͠ cronΛ͑Ͱ͖ΔͶ
cronӡ༻Ͱى͖ͨ͜ͱ • ͳ͔ͥࢦఆͨ࣌ؒ͠ʹىಈ͠ͳ͍ • ࣮ߦݖݶʁ࣌ؒʁcrondىಈͯ͠Δ? • ࣮ߦϑΝΠϧͰϩάग़ͯ͠ͳ͍͔ΒԿ͕ى͖͔ͨݪ Ҽ͕͔Βͳ͍ 7
Γ͍ͨ͜ͱΛཧ 8 ఆظ࣮ߦ λεΫͷؔ࿈ੑ ࣮ߦঢ়ଶͷ֬ೝ EngҎ֎ͰϦτϥΠ
9 Airflowͷ࠾༻
Airflowͱ? • ϫʔΫϑϩʔϚωδϝϯτγεςϜ • OpenAir 2015ͰAirbnb͕ࣾࣗࣾͰ։ൃ͍ͯͨ͠ ͷΛΦʔϓϯιʔεԽͱൃද • ݱࡏApache IncubatorͷΦʔϓϯιʔεϓϩ
δΣΫτ 10
11 DAG TASK
Airflowͷ࠾༻ • ৄ͘͠ϒϩά • http://tech.speee.jp/entry/2016/07/07/050000 12
13 ॻ͍ͯͳ͍
࣍ • ࣗݾհ • AirflowͷಋೖܦҢ • AirflowΛӡ༻ͯ͠Έͯ • Kuroko2Λͳ͍ͥ͡Ίͨͷ͔ •
·ͱΊ 14
ྑ͔ͬͨ͜ͱ • λεΫͷґଘ͕ؔՄࢹԽ͞Εɺ࣮ߦ͞Ε͍ͯΔ࣌ Ͳ͜·ͰऴΘ͍ͬͯΔͷ͔͔Δ 15
ྑ͔ͬͨ͜ͱ • ϩάඪ४ग़ྗ, ඪ४Τϥʔग़ྗΛग़ྗͯ͘͠ΕΔ ͷͰԿ͔ஔ͖ͨͱ͖ʹσόοά͘͢͠ͳͬͨ 16
ྑ͔ͬͨ͜ͱ • ϓϩάϥϜΛमਖ਼Λඞཁͱ͠ͳ͍ݶΓ࠶࣮ߦEng Ҏ֎Ͱग़དྷΔΑ͏ʹ 17
͓͖ͨ • ϩάΠϯػೳ • UTC • DAGͷฤू • DAGϑΝΠϧͷංେԽ 18
ϩάΠϯػೳ • σϑΥϧτͰFalseͳͷͰઃఆ͕ඞཁ • http://qiita.com/hatappi/items/ 1b8a3a2d1f4b01c844ef 19
UTC • ͜Ε͍࣮ͭߦ͞ΕΔͰ͠ΐ͏͔ 20
21 Airflow͕ಈ͍͍ͯΔϚγ ϯͷλΠϜκʔϯʹΑΔ
Ϛγϯ͕JSTͷ࣌ • JSTͰ10:00ʹ࣮ߦ͞ΕΔͷͰը໘্ͷUTCදهͰ 1:00ʹ࣮ߦ͞ΕΔ • ը໘ͰݟΔ࣌ຖճ+9࣌ؒ͠ͳ͍ͱ͍͚ͳ͍͆ 22
ແ༻ͷUTC • UTCʹͳΔΑ͏ʹϋʔυίʔσΟϯά͞Ε͍ͯΔ • ৄ͘͠ • http://qiita.com/hatappi/items/2a4d41ca14746a3c98a6 23
DAGͷฤू • ৽نՃɺฤूίϚϯυϥΠϯ্͔Βߦ͏ • ੲຊޠίϝϯτ͕ग़དྷͳ͔ͬͨΑ͏͕ͩv1.8.0 Ͱ֬ೝͨ͠ͱ͜Ζग़དྷͨ 24
DAGϑΝΠϧͷංେԽ • PythonͰఆٛ͢ΔͷͰAPI௨৴ͰԿͰग़དྷΔ • ϩδοΫλεΫεΫϦϓτʹఆٛͯ͠DAGʹ λεΫͷґଘؔεέδϡʔϧʹઐ೦ͤ͞Δ ͖ͩͬͨ 25
࣍ • ࣗݾհ • AirflowͷಋೖܦҢ • AirflowΛӡ༻ͯ͠Έͯ • Kuroko2Λͳ͍ͥ͡Ίͨͷ͔ •
·ͱΊ 26
Kuroko2ͱ • cookpadͷδϣϒཧπʔϧ • RailsʹͷͤΔܗͰ༻͢Δ • ϩάΠϯGoogleOAuthೝূ͕͍͍ͭͯΔ • ࣌ࠁRailsͷઃఆ͕ө͞ΕΔ •
ϒϥβ্͔Β৽نՃɺฤू͕ग़དྷΔ 27
ॻ͖׳ΕͨݴޠͰ͋Δ͜ͱ • ࣾͷϝΠϯݴޠ͕RubyͳͷͰ৽͍͠ํ͕ೖͬͯ ཧղ͍͢͠ • ίʔυRubyͰ͔͔Ε͍ͯΔͷͰίʔυಡΊΔ ͠ͳ͓ͤΔ • ΄͍͠ػೳ͕͋ΕࣗͰ։ൃग़དྷΔ •
https://github.com/hatappi/kuroko2_read_only 28
࣍ • ࣗݾհ • AirflowͷಋೖܦҢ • AirflowΛӡ༻ͯ͠Έͯ • Kuroko2Λͳ͍ͥ͡Ίͨͷ͔ •
·ͱΊ 29
·ͱΊ • AirflowͰKuroko2Ͱࣗͷతʹ͋ͬͨͷ Λ༻͢Δͱྑͦ͞͏Ͱ͢ • OSSͳͷͰԿ͔͋Εcommit͘Β͍ͷؾ࣋ͪ • DAGઈରʹංେԽͤ͞ͳ͍ʂ 30
31 ͓ΘΓ