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
Apache Beam Go SDK 触ってみた話
Search
apstndb
March 25, 2018
Programming
1.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Apache Beam Go SDK 触ってみた話
Open Go Friday #2 で話した資料
2018年3月時点の master ブランチを触ってみた話です。
apstndb
March 25, 2018
More Decks by apstndb
See All by apstndb
GKE/Kubernetes の Service はどう動いているのか
apstndb
18
10k
Other Decks in Programming
See All in Programming
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
150
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
280
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
2.7k
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
320
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
340
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
260
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
460
The Rails Doctrine Decade
koic
2
100
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2k
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
230
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
380
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
Navigating Team Friction
lara
192
16k
Transcript
Apache Beam Go SDK 触ってみた話 apstndb
Apache Beam とは • Google 発のバッチ処理とストリーミング処理の統一モデルである Dataflow モデル を扱う OSS
• フルマネージドなデータ処理サービス Google Cloud Dataflow 実行可能 ◦ そもそも Apache 寄贈前は Dataflow SDK ◦ 他の Runner 上でも実行可能(Spark, Flink, etc...) • 2.4.0 では Java と Python の SDK が含まれる ◦ 2018年3月現在開発が進んでいる目玉は Streaming SQL と Go SDK • Go でもクラウドで分散データ処理が可能になる?
Apache Beam Go SDK のステータス(2018/3現在) - 設計資料 https://s.apache.org/beam-go-sdk-design-rfc - JIRA
の sdk-go コンポーネントとして管理されている - 開発状況 - 長い間 go-sdk ブランチで開発 - Apache Beam 2.4 ブランチが切られてから master にマージ済 - 2.5 でリリース予定? https://github.com/apache/beam/blob/master/sdks/go/README.md
Apache Beam Go SDK のステータス
構成要素 - PCollection - Beam 上でのデータセット - リストのようなもの - PTransform
- PCollection から PCollection を作る操作 - 複数入出力でマージ(JOIN) や分岐も可能 - ParDo は map / flatMap 相当 - 他にも Combine, GroupByKey, Flatten, Partition 等
ソースコードの実例 var input beam.PCollection = beam.Create(s, 1, 2, 3, 4)
var square beam.PCollection = beam.ParDo(s, func(x int) int { return x * x }, input) // int to int var strings beam.PCollection = beam.ParDo(s, strconv.Itoa, square) textio.Write(s, *output, strings) 値の型がない!
Go SDK での実行におけるフェーズ • Compile ◦ 通常の Go のプログラムとしてコンパイルする ◦
型チェックが行われるがジェネリクスがないため大部分は検査できない • Pipeline Construction ◦ Go のプログラム実行時に Beam の実行グラフを生成する ◦ リフレクションでパイプラインの型チェックをする ▪ panic するか err で受け取るかは選択可能 • Runtime ◦ 実行グラフを元に Runner 上で実行する ▪ Cloud Dataflow のジョブ内での処理に対応 ◦ 型チェック済なので安全
実行時に管理される型情報 stringList := beam.CreateList(s, []string{"a", "b", "c"}) fmt.Println("stringList:", stringList.Type()) //
stringList: string intList := beam.CreateList(s, []int{1, 2, 3}) fmt.Println("intList:", intList.Type()) // intList: int convList := beam.ParDo(s, strconv.Itoa, intList) fmt.Println("convList:", convList.Type()) // convList: string convList2 := beam.ParDo(s, strconv.Itoa, stringList) fmt.Println("convList2:", convList2.Type()) // panic
Direct Runnerでの実行 • ローカルで実行可能 • パイプラインのグラフのにおける型情報がデバッグ出力される • 実装済の機能は動く
Cloud Dataflow での実行 • ジョブを発行可能 ◦ グラフが見える • 2018/3 現在の
master は機能せず • 途中から詰まったままになる • 実行状況の詳細も取れない ◦ Currently unsupported らしい
まとめ - Go にも分散処理が来る日は近そう - 脱 Java したい! - エディタでの対応が望まれる(型チェック・補完)
- Go にもやっぱりジェネリクスは欲しいのでは?