Storm の新機能について @HSCR #hadoopreading
-
Upload
yahoo -
Category
Technology
-
view
218 -
download
1
Transcript of Storm の新機能について @HSCR #hadoopreading
![Page 1: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/1.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
2017年3月8日
ヤフー株式会社 小野和輝
Storm の新機能について
@ HSCR
![Page 2: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/2.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
自己紹介
2
小野 和輝 (おのかずき)
- 入社1年目
- リアルタイム分散処理基盤の運用 / 保守
- 安定したリアルタイム分散処理基盤の提供
- カッパとアザラシ推しの街に住んでいます
写真:アフロ
![Page 3: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/3.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .3
今日お話する内容
Apache Storm 1.x 系の新機能
2017/2/14 storm 1.0.3 release … 特に大きな変化は無いはず…
- 処理性能の向上 (レイテンシ60%軽減 / スループット 16倍) !
- ファイルをトポロジーと一緒にデプロイしなくても ok !
- デフォルトで HA に対応したよ !
- ログの操作が簡単になったよ !
![Page 4: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/4.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
Agenda
4
Distributed Cache API
Highly Available Nimbus
Distributed Log Search
Dynamic Log Level Settings
![Page 5: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/5.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
Agenda
5
Distributed Cache API
Highly Available Nimbus
Distributed Log Search
Dynamic Log Level Settings
![Page 6: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/6.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .6
Storm 0.9 系…
トポロジーで読み込むデータの
サイズが大きすぎる… (´・ω・`)
トポロジーをクラスタに投入するまでに
めっちゃ時間かかる… (´・ω・`)
\(^o^)/
![Page 7: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/7.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
Distributed Cache API | 概要
7
概要
ファイルを HDFS などに登録して外から呼び出す機能
- BlobStore と呼ばれるインタフェースを使用
- Supervisor 起動時に BlobStore の Map を取得
$ storm blobstore create --file <登録するファイル> --acl o::rwa --replication-factor 4 key1
BlobStore へ登録するファイル レプリケーション数の設定
ACL の設定
- Secure な Storm クラスタでのみ有効
![Page 8: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/8.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .8
$ storm blobstore create --file README.markdown --acl o::rwa --replication-factor 4 key1
…
3283 [main] INFO o.a.s.c.blobstore - Creating key1 with ACL ("o::rwa")
3912 [main] INFO o.a.s.c.blobstore - Successfully created key1
key1 で README.markdown を BlobStore へ登録
$ less ${storm.local.dir}/blobs/729/data_key1/data
Master Branch: [![Travis CI](https://travis-ci.org/apache/storm.svg?branch=master)] …
Storm is a distributed realtime computation system…
BlobStore へ登録したファイルの確認
Distributed Cache API | 使ってみる
![Page 9: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/9.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .9
実装内容
WordCountTopology へ単語のフィルタリング機能を実装
- BlobStore へ 単語のブラックリストを登録
- じゃぱりぱーく Java でつくりました
RandomSentenceSpout WordCount
SplitSentence
- BlobStore からブラックリストを取得してフィルタリング
- The / cow / jumped / over / moon をブラックリストへ登録
Distributed Cache API | 実装してみる
![Page 10: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/10.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
単語 出現数 単語 出現数
snow
four
ago
white
dwarfs
an
apple
50
51
52
54
52
57
57
単語 出現数
the
cow
jumped
over
moon
0
0
0
0
0
score 50
year 50
keeps
day
a
doctor
away
57
57
57
57
57
and
seven
101
101
blacklist に登録した単語はカウントしていない
送信する文章the cow jumped over the moon / an apple a day keeps the doctor away
four score and seven years ago / snow white and seven dwarfs
Distributed Cache API | 実装してみる
6
![Page 11: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/11.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
Agenda
11
Distributed Cache API
Highly Available Nimbus
Distributed Log Search
Dynamic Log Level Settings
![Page 12: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/12.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .12
Storm 0.9 系…
Nimbus が SPOF \(^o^)/
![Page 13: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/13.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .13
Highly Available Nimbus | 概要
概要 Nimbus での障害発生時にシステムの可用性が低下することを抑制
リーダー Nimbus
- 投入されたトポロジーに関するメタファイルを生成
- 他 Nimbus へメタファイルを生成したことを通知
他 Nimbus
- メタファイルをダウンロードトポロジーの投入
![Page 14: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/14.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .14
検証項目
リーダーを再起動
リーダーを停止
リーダー停止 → トポロジーを操作
リーダー停止 → トポロジー操作 → リーダー再起動
新しいリーダーからトポロジーを投入
全ての Nimbus を停止してリーダ以外の Nimbus を起動
リーダーが切り替わる
リーダーが切り替わる
操作可能
トポロジー操作後の状態を維持
Storm UI で Internal Server Error!!!
投入可能
検証結果
最後にリーダーだった Nimbus を起動する必要がある
Highly Available Nimbus | 検証
![Page 15: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/15.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
Agenda
15
Distributed Cache API
Highly Available Nimbus
Distributed Log Search
Dynamic Log Level Settings
![Page 16: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/16.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .16
Storm 0.9 系…
トポロジーのログが探しづらい
\(^o^)/
![Page 17: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/17.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .17
概要 Storm UI 上で特定のトポロジーのログを全 Worker から検索する機能
Distributed Log Search | 概要
Worker B 上に存在する検索対象のログ
Worker A 上に存在する検索対象のログ
![Page 18: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/18.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .18
Distributed Log Search | 使い方 (1/2)
虫眼鏡アイコンを選択
![Page 19: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/19.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .19
Distributed Log Search | 使い方 (2/2)
虫眼鏡アイコンを選択
- Topology Id : 検索したいトポロジーの ID
- Search : 検索対象の文字列
![Page 20: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/20.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .20
Worker A 上で動作するwordcount に関するログ一覧
おまけ | Worker ごとのログ検索
![Page 21: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/21.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .
Agenda
21
Distributed Cache API
Highly Available Nimbus
Distributed Log Search
Dynamic Log Level Settings (おまけ)
![Page 22: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/22.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .22
Dynamic Log Level Setting | 概要
概要トポロジーを起動したままログレベルを変更できる機能
- Storm UI / Storm CLI から変更可能
![Page 23: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/23.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .23
Dynamic Log Level Setting | UI から変更
![Page 24: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/24.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .24
Dynamic Log Level Setting | CLI で変更
$ storm set_log_level <topology> -l <logger>=<Level>:<Timeout>
$ storm set_log_level <topology> -r <logger>
$ storm set_log_level kazono-wordcount -l ROOT=ERROR:30
$ storm set_log_level kazono-wordcount -r ROOT
ログレベルの設定を行う Storm CLI
設定したログレベルの削除を行う Storm CLI
![Page 25: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/25.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .25
まとめ
![Page 26: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/26.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .26
まとめ
Storm の新機能をしってるフレンズなんだね!
写真:アフロ
![Page 27: Storm の新機能について @HSCR #hadoopreading](https://reader034.fdocuments.net/reader034/viewer/2022051318/58d0e76d1a28abba558b5487/html5/thumbnails/27.jpg)
Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .Copyrig ht © 2017 Yahoo Japan Corporation. All Rig hts Reserved .27
EOP