福田 潔
Google Cloud Platform カスタマーエンジニア
Google Cloud
No-Ops で大量データ処理基盤を
簡単に実現する
BigQuery と Cloud Dataflow で実現する次世代データ処理基盤
Data + No-Ops
Data makes software great.
Apps (and companies) win or lose based on how they use it.
Better software, faster.
分析
クラスタを作成クラスタを管理
クラスタを
アップグレード
インデックスを
定義
ソフトウェアを
セットアップ
ネットワークを
セットアップ
スケールを管理
典型的なデータウェアハウス
インフラではなく、データから
知見を導くところにフォーカス
する
分析
クラウド時代の
Big Data アーキテクチャ
分析に費やす時間を増やす
1 Billion Users
Enterprise
世界を駆け巡る Google バックボーンネットワーク
1111
http://www.submarinecablemap.com/#/submarine-cable/faster
データセンター内の
高速ネットワーク
● 5th generation of
custom-made network fablic
● 1Pbps = 100K machines x
10Gbps
Jupitor
Borg
大規模クラスタ
管理システム
● Everything at Google runs
in a container
● Separate of infra /
application
● Prod + Non-Prod runs on
same machine
2016
Google
Research
20082002 2004 2006 2010 2012 2014 2015
Open
Source
2005
Google
Cloud
Products
GFS
Map
Reduce
15年以上、データの問題に向き合ってきた
2016
Google
Research
20082002 2004 2006 2010 2012 2014 2015
Open
Source
2005
Google
Cloud
Products BigQuery Pub/Sub Dataflow Bigtable ML
GFS
Map
Reduce
BigTable Dremel
Flume
Java Millwheel Tensorflow
Apache Beam
PubSub
15年以上、データの問題に向き合ってきた
ビッグデータのライフサイクル
保存 分析処理収集
分析保存収集
BigQuery
(SQL)
処理
Cloud
Dataflow
(stream
and batch)
Cloud
Storage
(objects)
Cloud
Datastor
(NoSQL)
BigQuery
Storage
(structured)
Cloud Dataproc (Hadoop & Ecosystem)
Cloud
Bigtable
(NoSQL
HBase)
Cassandra hBase MongoDBRabbit MQ Kafka
Cloud 2.0
Cloud 3.0
可視化
Cloud DataLab
(iPython/Jupyter)
Tableau
Pub/Sub
Stackdriver
Logging
BQ
Streaming
App
Engine
Cloud
SQL
(SQL)
Cloud
Machine
Learning
プロダクトをマップすると
Cloud
Spanner
(NewSQL)
リファレンスアーキテクチャ : データを収集する
Cloud Pub/Sub
At Leaast One の信頼性を持つ、スケーラブルなNo-Opsグローバル分散
メッセージ・キュー
Cloud Storage
オブジェクトストレージ。外部システムが出力するファイルの
GCPへのエントリーポイントとなる
生ログ、ファイル、外
部システムからのア
ウトプット 等
イベント、
メトリック等
Stackdriver Logging
GCP および AWS(EC2) からログイベントを収集
APIを介して任意のアプリケーションログも収集
GCPのシステムロ
グ、アプリケーション
ログ 等
Transfer Service
リファレンスアーキテクチャ : 処理および変換
生ログ、ファイル、外
部システムからのア
ウトプット 等
イベント、
メトリック等
GCPのシステムロ
グ、アプリケーション
ログ 等
Stream
Batch
Cloud Dataflow
バッチ/ストリーム両方に対応した
データ処理エンジン
Transfer Service
リファレンスアーキテクチャ : 処理および変換
生ログ、ファイル、外
部システムからのア
ウトプット 等
イベント、
メトリック等
GCPのシステムロ
グ、アプリケーション
ログ 等
Stream
Batch
Cloud Dataflow
バッチ/ストリーム両方に対応した
データ処理エンジン
Cloud Dataproc
Spark / Hadoop のマネージド・サービス
Batch
リファレンスアーキテクチャ : 分析および保存
生ログ、ファイル、外
部システムからのア
ウトプット 等
イベント、
メトリック等
GCPのシステムロ
グ、アプリケーション
ログ 等
Stream
Batch
Batch
BigQuery
大規模データセットに対する
高性能クエリーエンジン
リファレンスアーキテクチャ : 分析および可視化
生ログ、ファイル、外
部システムからのア
ウトプット 等
イベント、
メトリック等
GCPのシステムロ
グ、アプリケーション
ログ 等
Stream
Batch
Batch
外部
アプリケー
ション
Cloud Datalab
可視化および
BI
データ共有
B C
A
BigQuery
Dataproc
Dataflow
Cloud Storage
Pub/Sub
Stackdriver Logging
生ログ、ファイル、外
部システムからのア
ウトプット 等
イベント、
メトリック等
GCPのシステムロ
グ、アプリケーション
ログ 等
Stream
Batch
Batch
外部
アプリケー
ション
Cloud Datalab
可視化および
BI
データ共有
B C
A
a No-Ops big data stack
that scales automatically
Cloud
Dataflow
Batch/Streaming
Processing
BigQuery
Large Scale
Analytics
BigQuery
Fully managed, Petabyte Scale, Low Cost
Enterprise Data Warehouse for analytics
26
BigQuery とは?
耐久性があり高可用性を備える
スタンダードSQL
ペタバイト規模で高速
フルマネージドの No-Ops データウェアハウス
BigQuery の内部構造
SQL クエリ
ペタビット
ネットワーク
BigQuery
カラム指向ストレージ コンピュート
ストリーミングイン
ジェスト
高速バッチロード
Google Cloud
Storage
Google
Drive
Google
スプレッドシート
Federated Query
デモ
1PB Query
継続的な改善
2010 2011 2012 2013 2014
公開
大規模なクエリ結果
2015 2016
900
300
0
1,200
Google I/O でベータリリース
Dremel X
Big JOIN サポート
ダイナミック
エグゼキューション
Capacitor
シャッフル高速化
100k qps のストリーミン
グ
ユーザー定義関数
100k qps の
ストリーミング
Code Submits
Unstructured data accounts for
90% of enterprise data*
*Source: IDC
Dataflow
New default of stream processing
バッチ処理の問題点:データは継続的に生成される
(=Unbounded Data)。なぜ処理するために待たなければなら
ないのか?
Dataflow(Apache Beam) は
ストリーム処理の新しいデフォルト
バッチ処理はストリーム処理のサブセットと捉える
Cloud Dataflow とは?
20122002 2004 2006 2008 2010
MapReduce
GFS Big Table
Dremel
Pregel
FlumeJava
Colossus
Spanner
2014
MillWheel
Dataflow
2016
Dataflow は新しいデフォルト
Dataflow モデル および Cloud Dataflow
Dataflow Model & SDKs
バッチおよびストリーム処理の
統合プログラムモデル
no-ops, フルマネージドサービス
(実行環境)
Google Cloud Dataflow
Apache
Beam
{a->[apple, art, argentina], ar->[art, argentina, armenia],...}
Count
ExpandPrefixes
Top(3)
Write
Read
ExtractTags
{a->(argentina, 5M), a->(armenia, 2M), …,
ar->(argentina, 5M), ar->(armenia, 2M), ...}
{#argentina scores!, watching #armenia vs
#argentina, my #art project, …}
{argentina, armenia, argentina, art, ...}
{argentina->5M, armenia->2M, art->90M, ...}
Tweets
Predictions
Count
ExpandPrefixes
Top(3)
Write
Read
ExtractTags
Tweets
Predictions
Pipeline p = Pipeline.create(new PipelineOptions());
p
p.run();
.apply(ParDo.of(new ExtractTags()))
.apply(Top.largestPerKey(3))
.apply(Count.perElement())
.apply(ParDo.of(new ExpandPrefixes())
.apply(TextIO.Write.to(“gs://…”));
.apply(TextIO.Read.from(“gs://…”))
class ExpandPrefixes … {
public void processElement(ProcessContext c) {
String word = c.element().getKey();
for (int i = 1; i <= word.length(); i++) {
String prefix = word.substring(0, i);
c.output(KV.of(prefix, c.element()));
}
}
}
NYC Taxi and Limousine Commissions : Open Data
Cloud Pub/Sub
(public dataset)
Dataflow
ETL using
Cloud Dataflow
BigQuery
BigQuery
Cloud Pub/Sub
Visualize
Application
Datalab
DataStudio
デモの結果は?
1PB Query
“クラウドプロバイダは成熟してきた。
コストが下がり、信頼性が増し、様々なサービス
を提供するようになってきた”
Spotify
http://www.slideshare.net/JoshBaer/shortening-the-feedback-loop-big-data-spain-external
“物理マシンを所有して運用することは、我々に
とっては競争優位ではない “
Spotify
http://www.slideshare.net/JoshBaer/shortening-the-feedback-loop-big-data-spain-external
“我々はビッグデータ技術におけるGoogle の
先進性が、我々のデータ処理に優位をもたら
してくれると信じている”
Spotify
http://www.slideshare.net/JoshBaer/shortening-the-feedback-loop-big-data-spain-external
cloud.google.com
https://goo.gl/EolvdJ
4月21日 | 10:00 AM - 5:30 PM
ベルサール渋谷ファースト
参考
● BigQuery
○ https://cloud.google.com/bigquery/
● Dataflow
○ https://cloud.google.com/dataflow/
● Google Big Data Blog
○ https://cloud.google.com/blog/big-data/
● NYC Taxi Tycoon Codelab
○ https://goo.gl/4g5eep
● Architecture: Optimized Large-Scale Analytics Ingestion
○ https://cloud.google.com/solutions/architecture/optimized-large-scale-a
nalytics-ingestion
Thank You!
fukudak@google.com

No-Ops で大量データ処理基盤を簡単に実現する