State of the art Stream Processing #hadoopreading

>100 Views

August 22, 16

スライド概要

Hadoopソースコードリーディング 第21回のスライドです。
https://www.eventbrite.com/e/hadoop-21-tickets-26913657474

profile-image

2023年10月からSpeaker Deckに移行しました。最新情報はこちらをご覧ください。 https://speakerdeck.com/lycorptech_jp

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

Hadoop Summit 2016 San Jose出張報告 - State of the art Stream Processing Hadoop Source Code Reading #21 ヤフー株式会社 古山 慎悟 2016年8月18日 http://www.yahoo.co.jp/

2.

1. 2. 3. 4. 5. はじめに Apache Flink Apache Storm/Heron その他のフレームワーク おわりに

3.

1. 2. 3. 4. 5. はじめに Apache Flink Apache Storm/Heron その他のフレームワーク おわりに

4.

はじめに • • • この発表について 発表者について 発表者が聞いてきたセッション一覧 Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 4

5.

この発表について • この発表では、 Hadoop Summit 2016 San Joseで聞いてきた各種 ストリーム処理実行エンジンについて紹介します Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 5

6.

発表者について • • • • 2016/4~ – Yahoo! JAPANでストリーム処理チームのマネージャー 2014/4 ~ – Yahoo! JAPANで金融とかデータとか 2011/10 ~ – ノーチラステクノロジーズでAsakusa Frameworkとか – ←はノーチラスのときに書いてもらったもの 2007/4 ~ – Simplex Technologyで金融まわりのいろいろ ご参考 https://www.linkedin.com/in/shingofuruyama Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 6

7.

発表者が聞いてきたセッション一覧 Monday June 27, 2016 • Flink Meetup Wednesday, June 29, 2016 Thursday, June 30, 2016 • Blink - Improved Runtime for • The Future of Apache Storm Flink and its Application in • Turning the Stream Processor Alibaba Search into a Database: Building Tuesday, June 28, 2016 • Scalable Realtime Analytics Online Applications on Streams • What the #$* is a Business using Druid • Managing Hadoop, HBase, and Catalog and Why You Need It! • Fine-Grained Security for Spark Storm Clusters at Yahoo Scale • Streaming in the Wild with and Hive • Next Gen Big Data Analytics Apache Flink Lambda-less Stream Processing with Apache Apex • Governed Self Service Analytics • @ Scale in LinkedIn • Apache Beam: A Unified Model at eBay for Batch and Streaming Data • Analysis of Major Trends in Big Processing Data Analytics • BoF: Streaming & Data Flow • H2O: A Platform for Big Math • • How to Build a Successful Data Lake Instrument Your Instruments: Data-Driven Ops Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 7

8.

1. 2. 3. 4. 5. はじめに Apache Flink Apache Storm/Heron その他のフレームワーク おわりに

9.

Flink • Streaming in the Wild with Apache Flink 出所: https://www.youtube.com/watch?v=1JV5o5g30-k Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 9

10.

聞いてきたセッション • • • • • Flink Meetup (前夜祭的なもの) Robust Stream Processing with Apache Flink Streaming in the Wild with Apache Flink Turning the Stream Processor into a Database: Building Online Applications on Streams Blink Improved Runtime for Flink and its Application in Alibaba Search Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 10

11.

FlinkはリカバリのためにStateを管理する実行モデル 出所: http://www.slideshare.net/HadoopSummit/streaming-in-the-wild-with-apache-flink-63921696 Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 11

12.

アプリケーションの書き味 出所: http://www.slideshare.net/HadoopSummit/the-stream-processor-as-a-database-apache-flink Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 12

13.

実現したいもの • • • • • • Exactly-once guarantees Low latency High throughput Powerful computation model Low overhead of the fault tolerance mechanism in the absence of failures Flow control 出所: http://data-artisans.com/high-throughput-low-latency-and-exactly-once-stream-processing-with-apache-flink/ Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 13

14.

それを実現するための理論的背景 • • • • • 出所: http://arxiv.org/abs/1506.08603 障害発生時に、データをどこまで処理したか正確に 記録されていて、処理されていないデータが残って いれば、再実行によって正確な結果が得られる(た だし分散システム) 入力をとめて計算がすべて終わるのを待てば、一貫 性のあるスナップショットを取れる(ただしスナッ プショットを取りきるまで計算は停止する) それだとあまりにあれなので、Chandy-Lamportが よく使われているけど、空間効率がよくない FlinkではGlobal Distributed Savepointsの実装でh 左の論文で提案されているAsynchronous Barrier Snapshottingを採用 アプリケーションのDAG(実行計画)におけるタス クとエッジの状態からスナップショットをつくるの で空間効率がよい Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 14

15.

高度に発達したストリーム処理の枠組みはKVSと見分けがつかない 出所: http://www.slideshare.net/HadoopSummit/the-stream-processor-as-a-database-apache-flink Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 15

16.

Flinkのすごいところ • • レイテンシと一貫性にトレードオフがあったのは過去の話 Flinkはレイテンシも一貫性も両方取れる Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 16

17.

Flinkのすごくないところ • 現時点ではスケールしない? Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 17

18.

Flinkの将来 • • • 1.0 現行最新版 1.1 Monitoringの強化 – 具体的な中身は見てないけどStorm追従に見える 1.2 Dynamic scaling – 具体的な中身は見てないけどApex追従に見える Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 18

19.

1. 2. 3. 4. 5. はじめに Apache Flink Apache Storm/Heron その他のフレームワーク おわりに

20.

Storm vs Heron • The Future of Apache Storm 出所: https://www.youtube.com/watch?v=_Q2uzRIkTd8 Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 20

21.

Storm vs Heron • • Storm – 2011/9のどこかでOSSとして公開される – オリジナルはTwitterが開発 – Storm @Twitter SIGMOD’14 に詳細あり Heron – 2015/6/2にTwitterのブログで存在が発表される • https://blog.twitter.com/2015/flying-faster-with-twitterheron – オリジナルはTwitterが開発 – Twitter Heron: Stream Processing at Scale SIGMOD’15 に詳細 あり Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 21

22.

Heronの話題性 • Nathan MarzというTwitterでStormをやっていたエンジニアがコミュ ニティをはなれたためStormコミュニティが衰退 • もともとStormがTwitterでつくられていたこと、HeronはStormの完 全上位互換である的な語り口だったことからStormオワコン説が有力に Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 22

23.

Heronの特徴 • • • • • Off the shelf scheduler: Mesosでうごく Handling spikes and congestion: backpressure Easy debugging: タスクの粒度を改善、アプリケーションの構造を可 視化 Compatibility with Storm: Stormで動くのと同じアプリケーション がHeronでも動く Scalability and latency: 対Storm比10-14倍くらいのスループット Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 23

24.

Storm 1.xで追加された機能 • • • • • • • • • Pacemaker Distributed Cache Nimbus HA Windowまわりのハンドリング (Timestamp/Watermarkを導 入) Stateful Bolt Checkpointing Backpressure Resource Aware Scheduler Dynamic Log Levels • • • • • Tuple Sampling Distributed Log Search Dynamic Profiling Supervisor Health Check Performance 同じストリームに 対して16倍くらいのスループッ ト Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 24

25.

HeronにあってStormにないもの • • Off the shelf scheduler – MesosとかYARNではStormのアプリケーションを動かせない – いちおうSliderとかをつかうとStorm on YARNは可能っぽい BackpressureをZookeeperとあわせて使うとあかんらしい(という のが最近発覚した) – STORM-1949 Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 25

26.

Stormの将来 • • • 1.0.xはHeronより高機能・同性能と言っても過言ではないほどに改善 が進んでいる 1.1.xでメトリクスまわりがさらに改善される 2.xでは「コミッタの裾野を広げるため」にJava化する Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 26

27.

1. 2. 3. 4. 5. はじめに Apache Flink Apache Storm/Heron その他のフレームワーク おわりに

28.

その他のフレームワーク Samza Apex Beam/MillWheel Cloud Dataflow Spark Streaming • • 運用管理まわりがいけてるらしい See “Lambda-less Stream Processing @ Scale in LinkedIn” • Partitionの動的最適化やアプリケーションの無停止アップグレー ドがウリ See “Next Gen Big Data Analytics with Apache Apex” • • • • MillWheelが全ての原点といっていいほど参考にされている FlinkがMillWheelを超えている説も? See “Apache Beam: A Unified Model for Batch and Streaming Data Processing” • • 自分の観測範囲ではDisられ侍だった 聞くところによるとClouderaのセッションではSpark Streaming推しだった模様で、ベンダによっていろいろ事情が異 なるっぽい Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 28

29.

1. 2. 3. 4. 5. はじめに Apache Flink Apache Storm/Heron その他のフレームワーク おわりに

30.

おわりに • • まとめ 参考資料 Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 30

31.

まとめ • • • StateをArtisticに扱ってていけてる感があるのはFlinkで、今後に注目 スケーラビリティや運用管理まわりに一日の長があるので、 Productionで使うならStormがよさそう ほかも一長一短まあいろいろあるので戦国時代の様相 Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止 31

32.

参考資料 • • 当日のアジェンダ – http://hadoopsummit.org/san-jose/agenda/ 当日のビデオ – https://www.youtube.com/channel/UCAPaK_rhylDZAUHVxqqsRA

33.

We are hiring!!

34.

EOP