Hadoop Conference Japan 2014 参加メモ(個別セッション②) #hcj2014
Hadoop Conference Japan 2014 参加メモ(キーノート) #hcj2014 と Hadoop Conference Japan 2014 参加メモ(個別セッション①) #hcj2014 の続きです。
長くなったので、最後のセッションはさらに分割します。
A Deeper Understanding of Spark Internals
- Patrick Wendell (Databricks)
Agenda
How spark runs, focus on performance
Major core components
- Excecution model
- The suffule
- Caching <- not cover in this session
Scala example
最初の文字の出現頻度を数える
sc.textFile("hdfs://names") .map(name =x> (name.charAt(0), name)) .groupByKey() .mapValues(names => names.toSet.size) .collect()
Excecution model
Create DAG/RDDs
- HadoopRDD
- map()
- groupby()
- mapValues()
- collect()
- HadoopRDD
Create execution plan
- pipeline as much as possible
- Split into "stages" based on need to reorganize data
Schedule tasks
- split each stage into tasks
- schedule tasks
The shuffle
- Redistribution data
- Pull-based
write intermediate file to disk
- network bound
各パーティションごとにHash mapを構築する
- 一つのキーと値のペアはメモリ上に収まる必要がある
What went wrong?
- Too few partition to get good
- Large per key groupby()
shipped data accross the cluster
Ensure enough partitions
- Minimize memory
- minimize shuffled
- Know the standard library
too few partitions/too many partitions
- reasonable number of partitions
Fix the problem
.repartition(6) .distinct()
Low level performance
QA
Does spark support JOIN?
- yes
Hive, Shark or SparkSQL
- SparkSQLに統合しようとしている
- Sharkは新しいプロジェクトでは使うな
- SparkSQLに統合しようとしている
LT
LTを見に行きましたが、こちらのメモはカオスなので、一旦割愛で。
Evolution of Impala - Hadoop 上の高速SQLエンジン、最新情報
- 嶋内 翔(Cloudera)
- 今日はこのために来たと行ってもいい
Impalaのサービス
impalad
- クエリを実行する
- どのデーモンもクエリを受け付けられる。
- 受け付けたノードがコーディネータ
statestore
- ネームサービス
- impaladの簡単な死活監視のみ
- このサービス自体は死んでいても動作はする
catalogd
- メタデータ管理
- あとで詳細
実行計画
- シングルノードプランの作成
- プランフラグメントに分割
インメモリの実行
メタデータ管理
HBase連携
- 1行インサート可能
- 高速にインクリメントするカウンタをHBaseに持つ等のユースケースが可能
リソース管理
Llama
- 低レイテンシ用のアプリケーションマスタ
- YARNのスケジューリングを細かくするためのサービス
- YARNのリソース配分をキャッシュ
- 1.4でプロダクションレディ
- 低レイテンシ用のアプリケーションマスタ
Sentry
- データベース、テーブル、ビュー、列、行の単位でアクセス制御
- エコシステム全体で利用可能
パフォーマンスと最適化
スケーラビリティ
Impalaはリニアスケーラビリティがある。
HWを倍
- クエリによるがおおよそ倍の性能
- 倍のクラスタで、倍のユーザ
- 同じか良くなる傾向
ロードマップ
- 1.4
下半期に2.0を出す
- LAG
- LEAD
- 相関サブクエリ
- Nested Data(JSONとか)を入れる
Impala本からPDFが無償公開されているので読むと良い
QA
Impalaバージョン同士の比較は?
- バージョンの差異はすぐにはデータがない
UDTFは?
- 望んでいるというのは認識している。プライオリティが高いがまだロードマップに載ってきていない。