Submit Search
Comparison of Transactional Libraries for HBase
3 likes
2,046 views
DataWorks Summit/Hadoop Summit
Comparison of Transactional Libraries for HBase
Technology
Read more
1 of 100
Download now
Downloaded 40 times
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
More Related Content
PDF
OLAP options on Hadoop
Yuta Imai
PDF
Yifeng hadoop-present-public
Yifeng Jiang
PDF
Hive-sub-second-sql-on-hadoop-public
Yifeng Jiang
PDF
Yifeng spark-final-public
Yifeng Jiang
PDF
Hadoop/Spark セルフサービス系の事例まとめ
Yuta Imai
PDF
Hiveを高速化するLLAP
Yahoo!デベロッパーネットワーク
PDF
IoTアプリケーションで利用するApache NiFi
Yuta Imai
PDF
Deep Learning On Apache Spark
Yuta Imai
OLAP options on Hadoop
Yuta Imai
Yifeng hadoop-present-public
Yifeng Jiang
Hive-sub-second-sql-on-hadoop-public
Yifeng Jiang
Yifeng spark-final-public
Yifeng Jiang
Hadoop/Spark セルフサービス系の事例まとめ
Yuta Imai
Hiveを高速化するLLAP
Yahoo!デベロッパーネットワーク
IoTアプリケーションで利用するApache NiFi
Yuta Imai
Deep Learning On Apache Spark
Yuta Imai
What's hot
(20)
PDF
Start of a New era: Apache YARN 3.1 and Apache HBase 2.0
DataWorks Summit
PDF
Apache Hiveの今とこれから - 2016
Yuta Imai
PDF
Apache ambari
Yuta Imai
PDF
Introduction to Hadoop and Spark (before joining the other talk) and An Overv...
DataWorks Summit/Hadoop Summit
PDF
Spark at Scale
Yuta Imai
PDF
Case study of DevOps for Hadoop in Recruit.
DataWorks Summit/Hadoop Summit
PDF
Hadoop最新事情とHortonworks Data Platform
Yuta Imai
PDF
HDP Security Overview
Yifeng Jiang
PDF
Beginner must-see! A future that can be opened by learning Hadoop
DataWorks Summit
PDF
Apache Ambari Overview -- Hadoop for Everyone
Yifeng Jiang
PPTX
sparksql-hive-bench-by-nec-hwx-at-hcj16
Yifeng Jiang
PDF
HDInsight & CosmosDB - Global IoT · Big data processing infrastructure
DataWorks Summit
PPTX
The truth about SQL and Data Warehousing on Hadoop
DataWorks Summit/Hadoop Summit
PDF
Data Science on Hadoop
Yifeng Jiang
PPTX
Struggle against crossdomain data complexity in Recruit Group
DataWorks Summit/Hadoop Summit
PPTX
A Benchmark Test on Presto, Spark Sql and Hive on Tez
Gw Liu
PDF
NTT Communications' Initiatives to Utilize Infrastructure Data
DataWorks Summit
PDF
Hadoopとは
Hirokazu Yatsunami
PDF
A Tour of PostgreSQL
EDB
PPTX
Case Study: OLAP usability on Spark and Hadoop
DataWorks Summit/Hadoop Summit
Start of a New era: Apache YARN 3.1 and Apache HBase 2.0
DataWorks Summit
Apache Hiveの今とこれから - 2016
Yuta Imai
Apache ambari
Yuta Imai
Introduction to Hadoop and Spark (before joining the other talk) and An Overv...
DataWorks Summit/Hadoop Summit
Spark at Scale
Yuta Imai
Case study of DevOps for Hadoop in Recruit.
DataWorks Summit/Hadoop Summit
Hadoop最新事情とHortonworks Data Platform
Yuta Imai
HDP Security Overview
Yifeng Jiang
Beginner must-see! A future that can be opened by learning Hadoop
DataWorks Summit
Apache Ambari Overview -- Hadoop for Everyone
Yifeng Jiang
sparksql-hive-bench-by-nec-hwx-at-hcj16
Yifeng Jiang
HDInsight & CosmosDB - Global IoT · Big data processing infrastructure
DataWorks Summit
The truth about SQL and Data Warehousing on Hadoop
DataWorks Summit/Hadoop Summit
Data Science on Hadoop
Yifeng Jiang
Struggle against crossdomain data complexity in Recruit Group
DataWorks Summit/Hadoop Summit
A Benchmark Test on Presto, Spark Sql and Hive on Tez
Gw Liu
NTT Communications' Initiatives to Utilize Infrastructure Data
DataWorks Summit
Hadoopとは
Hirokazu Yatsunami
A Tour of PostgreSQL
EDB
Case Study: OLAP usability on Spark and Hadoop
DataWorks Summit/Hadoop Summit
Ad
Viewers also liked
(20)
PPTX
Hadoop Summit Tokyo Apache NiFi Crash Course
DataWorks Summit/Hadoop Summit
PPTX
From a single droplet to a full bottle, our journey to Hadoop at Coca-Cola Ea...
DataWorks Summit/Hadoop Summit
PDF
Hadoop Summit Tokyo HDP Sandbox Workshop
DataWorks Summit/Hadoop Summit
PPTX
Why is my Hadoop cluster slow?
DataWorks Summit/Hadoop Summit
PDF
#HSTokyo16 Apache Spark Crash Course
DataWorks Summit/Hadoop Summit
PPTX
Apache Hadoop 3.0 What's new in YARN and MapReduce
DataWorks Summit/Hadoop Summit
PPTX
Major advancements in Apache Hive towards full support of SQL compliance
DataWorks Summit/Hadoop Summit
PPTX
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
DataWorks Summit/Hadoop Summit
PDF
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
DataWorks Summit/Hadoop Summit
PPTX
Rebuilding Web Tracking Infrastructure for Scale
DataWorks Summit/Hadoop Summit
PDF
The real world use of Big Data to change business
DataWorks Summit/Hadoop Summit
PPTX
Streamline Hadoop DevOps with Apache Ambari
DataWorks Summit/Hadoop Summit
PPTX
Network for the Large-scale Hadoop cluster at Yahoo! JAPAN
DataWorks Summit/Hadoop Summit
PPTX
SEGA : Growth hacking by Spark ML for Mobile games
DataWorks Summit/Hadoop Summit
PPTX
Leveraging smart meter data for electric utilities: Comparison of Spark SQL w...
DataWorks Summit/Hadoop Summit
PPTX
Use case and Live demo : Agile data integration from Legacy system to Hadoop ...
DataWorks Summit/Hadoop Summit
PPTX
A Container-based Sizing Framework for Apache Hadoop/Spark Clusters
DataWorks Summit/Hadoop Summit
PPTX
Evolving HDFS to a Generalized Distributed Storage Subsystem
DataWorks Summit/Hadoop Summit
PPTX
What's new in Hadoop Common and HDFS
DataWorks Summit/Hadoop Summit
PPTX
A Multi Colored YARN
DataWorks Summit/Hadoop Summit
Hadoop Summit Tokyo Apache NiFi Crash Course
DataWorks Summit/Hadoop Summit
From a single droplet to a full bottle, our journey to Hadoop at Coca-Cola Ea...
DataWorks Summit/Hadoop Summit
Hadoop Summit Tokyo HDP Sandbox Workshop
DataWorks Summit/Hadoop Summit
Why is my Hadoop cluster slow?
DataWorks Summit/Hadoop Summit
#HSTokyo16 Apache Spark Crash Course
DataWorks Summit/Hadoop Summit
Apache Hadoop 3.0 What's new in YARN and MapReduce
DataWorks Summit/Hadoop Summit
Major advancements in Apache Hive towards full support of SQL compliance
DataWorks Summit/Hadoop Summit
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
DataWorks Summit/Hadoop Summit
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
DataWorks Summit/Hadoop Summit
Rebuilding Web Tracking Infrastructure for Scale
DataWorks Summit/Hadoop Summit
The real world use of Big Data to change business
DataWorks Summit/Hadoop Summit
Streamline Hadoop DevOps with Apache Ambari
DataWorks Summit/Hadoop Summit
Network for the Large-scale Hadoop cluster at Yahoo! JAPAN
DataWorks Summit/Hadoop Summit
SEGA : Growth hacking by Spark ML for Mobile games
DataWorks Summit/Hadoop Summit
Leveraging smart meter data for electric utilities: Comparison of Spark SQL w...
DataWorks Summit/Hadoop Summit
Use case and Live demo : Agile data integration from Legacy system to Hadoop ...
DataWorks Summit/Hadoop Summit
A Container-based Sizing Framework for Apache Hadoop/Spark Clusters
DataWorks Summit/Hadoop Summit
Evolving HDFS to a Generalized Distributed Storage Subsystem
DataWorks Summit/Hadoop Summit
What's new in Hadoop Common and HDFS
DataWorks Summit/Hadoop Summit
A Multi Colored YARN
DataWorks Summit/Hadoop Summit
Ad
Similar to Comparison of Transactional Libraries for HBase
(20)
PDF
トランザクションの並行実行制御 rev.2
Takashi Hoshino
PDF
20120405 setsunaセミナー
Takahiro Iwase
PDF
20分でわかるHBase
Sho Shimauchi
PPT
Transactional Information Systems入門
nobu_k
PDF
Cassandraのトランザクションサポート化 & web2pyによるcms用プラグイン開発
kishimotosc
PPTX
React+redux+saga 03
TIS Inc
PDF
トランザクションの並行処理制御
Takashi Hoshino
PDF
Typesafe Reactive Platformで作るReactive System
TIS Inc.
PDF
マルチ テナント クラウド アプリケーションの設計手法
Kazuyuki Nomura
PDF
HBaseCon 2012 参加レポート
NTT DATA OSS Professional Services
PPTX
20160115nodered design patterns
BMXUG
PDF
なぜリアクティブは重要か #ScalaMatsuri
Yuta Okamoto
PPTX
たのしいNode.js
ishiki-takai
PDF
20190219 hyperledger tokyo_meetup_min_bft
LFDT Tokyo Meetup
PDF
20120423 hbase勉強会
Toshiaki Toyama
PPTX
イベント駆動プログラミングとI/O多重化
Gosuke Miyashita
PDF
Guide to Cassandra for Production Deployments
smdkk
PDF
スケーラブルなシステムのためのHBaseスキーマ設計 #hcj13w
Cloudera Japan
PDF
Transaction description how to use it in laravel
yoshitaro yoyo
PPTX
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Takuya Iwatsuka
トランザクションの並行実行制御 rev.2
Takashi Hoshino
20120405 setsunaセミナー
Takahiro Iwase
20分でわかるHBase
Sho Shimauchi
Transactional Information Systems入門
nobu_k
Cassandraのトランザクションサポート化 & web2pyによるcms用プラグイン開発
kishimotosc
React+redux+saga 03
TIS Inc
トランザクションの並行処理制御
Takashi Hoshino
Typesafe Reactive Platformで作るReactive System
TIS Inc.
マルチ テナント クラウド アプリケーションの設計手法
Kazuyuki Nomura
HBaseCon 2012 参加レポート
NTT DATA OSS Professional Services
20160115nodered design patterns
BMXUG
なぜリアクティブは重要か #ScalaMatsuri
Yuta Okamoto
たのしいNode.js
ishiki-takai
20190219 hyperledger tokyo_meetup_min_bft
LFDT Tokyo Meetup
20120423 hbase勉強会
Toshiaki Toyama
イベント駆動プログラミングとI/O多重化
Gosuke Miyashita
Guide to Cassandra for Production Deployments
smdkk
スケーラブルなシステムのためのHBaseスキーマ設計 #hcj13w
Cloudera Japan
Transaction description how to use it in laravel
yoshitaro yoyo
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Takuya Iwatsuka
More from DataWorks Summit/Hadoop Summit
(20)
PPT
Running Apache Spark & Apache Zeppelin in Production
DataWorks Summit/Hadoop Summit
PPT
State of Security: Apache Spark & Apache Zeppelin
DataWorks Summit/Hadoop Summit
PDF
Unleashing the Power of Apache Atlas with Apache Ranger
DataWorks Summit/Hadoop Summit
PDF
Enabling Digital Diagnostics with a Data Science Platform
DataWorks Summit/Hadoop Summit
PDF
Revolutionize Text Mining with Spark and Zeppelin
DataWorks Summit/Hadoop Summit
PDF
Double Your Hadoop Performance with Hortonworks SmartSense
DataWorks Summit/Hadoop Summit
PDF
Hadoop Crash Course
DataWorks Summit/Hadoop Summit
PDF
Data Science Crash Course
DataWorks Summit/Hadoop Summit
PDF
Apache Spark Crash Course
DataWorks Summit/Hadoop Summit
PDF
Dataflow with Apache NiFi
DataWorks Summit/Hadoop Summit
PPTX
Schema Registry - Set you Data Free
DataWorks Summit/Hadoop Summit
PPTX
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
DataWorks Summit/Hadoop Summit
PDF
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
DataWorks Summit/Hadoop Summit
PPTX
Mool - Automated Log Analysis using Data Science and ML
DataWorks Summit/Hadoop Summit
PPTX
How Hadoop Makes the Natixis Pack More Efficient
DataWorks Summit/Hadoop Summit
PPTX
HBase in Practice
DataWorks Summit/Hadoop Summit
PPTX
The Challenge of Driving Business Value from the Analytics of Things (AOT)
DataWorks Summit/Hadoop Summit
PDF
Breaking the 1 Million OPS/SEC Barrier in HOPS Hadoop
DataWorks Summit/Hadoop Summit
PPTX
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
DataWorks Summit/Hadoop Summit
PPTX
Backup and Disaster Recovery in Hadoop
DataWorks Summit/Hadoop Summit
Running Apache Spark & Apache Zeppelin in Production
DataWorks Summit/Hadoop Summit
State of Security: Apache Spark & Apache Zeppelin
DataWorks Summit/Hadoop Summit
Unleashing the Power of Apache Atlas with Apache Ranger
DataWorks Summit/Hadoop Summit
Enabling Digital Diagnostics with a Data Science Platform
DataWorks Summit/Hadoop Summit
Revolutionize Text Mining with Spark and Zeppelin
DataWorks Summit/Hadoop Summit
Double Your Hadoop Performance with Hortonworks SmartSense
DataWorks Summit/Hadoop Summit
Hadoop Crash Course
DataWorks Summit/Hadoop Summit
Data Science Crash Course
DataWorks Summit/Hadoop Summit
Apache Spark Crash Course
DataWorks Summit/Hadoop Summit
Dataflow with Apache NiFi
DataWorks Summit/Hadoop Summit
Schema Registry - Set you Data Free
DataWorks Summit/Hadoop Summit
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
DataWorks Summit/Hadoop Summit
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
DataWorks Summit/Hadoop Summit
Mool - Automated Log Analysis using Data Science and ML
DataWorks Summit/Hadoop Summit
How Hadoop Makes the Natixis Pack More Efficient
DataWorks Summit/Hadoop Summit
HBase in Practice
DataWorks Summit/Hadoop Summit
The Challenge of Driving Business Value from the Analytics of Things (AOT)
DataWorks Summit/Hadoop Summit
Breaking the 1 Million OPS/SEC Barrier in HOPS Hadoop
DataWorks Summit/Hadoop Summit
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
DataWorks Summit/Hadoop Summit
Backup and Disaster Recovery in Hadoop
DataWorks Summit/Hadoop Summit
Comparison of Transactional Libraries for HBase
1.
Comparison of Transactional Libraries for HBase Toshihiro Suzuki Solutions Engineer, Hortonworks © Hortonworks Inc. 2011 – 2015. All Rights Reserved
2.
2 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ⾃⼰紹介 鈴⽊
俊裕(すずき としひろ) à Solutions Engineer, Hortonworks à 7⽉からHortonworksにジョイン à 前職は⼤⼿Web企業 – Hadoop/Hiveを⽤いたログ解析基盤の開発・運⽤(5年) – HBaseを⽤いたソーシャルグラフDB(3年) à 著書「HBase徹底⼊⾨」 à 最近はScalaを勉強しようと思っている à Twitter: @brfrn169
3.
3 © Hortonworks Inc. 2011 – 2016. All Rights Reserved アジェンダ Ã
背景 – トランザクションについて – HBaseについて – HBaseにおけるトランザクションについて Ã Tephraについて Ã Omidについて Ã Tephra vs Omid – 機能 – ベンチマーク Ã まとめ
4.
4 © Hortonworks Inc. 2011 – 2016. All Rights Reserved 背景
5.
5 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクション処理とは Ã
トランザクション – データに対する⼀連の操作を⼀つにまとめた単位のこと Ã ⼀般的なOLTPでは、複数のトランザクションが同時並⾏で処 理される Ã 複数のトランザクションが整合性を守って⾛るように管理す る機構が必要 – RDBMSでは標準的に⼊っている機構
6.
6 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクション処理とは Ã
例 – ⼝座Aから⼝座Bに1,000ドル移動させたいという銀⾏のトランザ クション • (1)⼝座Aに1000ドル以上⼊っていたら、(2)⼝座Aから-1000ドル、(3) ⼝座Bに+1000ドル • 起こりうる不整合ケースの例 – 引き落としが成功して、⼊⾦が失敗した場合 – 同時に上記のトランザクションが発⽣し、(1)を同時に実⾏してし まった場合に⼝座Aの残⾦がマイナスになる可能性 » ⼝座Aの残⾦が1000ドルだった場合 • T1: (1) ok (2) A – 1000 (3) B + 1000 • T2: (1)ok (2) A – 1000 (3) B + 1000 » 結果として⼝座Aの残⾦は-1000ドルになってしまう
7.
7 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクション処理とは Ã
ACIDというトランザクションが満たすべき技術要件 – Atomicity • 結果がAll-or-Nothingとなること – Consistency • ⼀貫性を守ること – Isolation • 過程が他のトランザクションから⾒えないこと – Durability • (障害が発⽣したとしても)結果が永続化されること
8.
8 © Hortonworks Inc. 2011 – 2016. All Rights Reserved なぜトランザクション管理機構が必要なのか Ã
アプリケーションの開発を容易にする – すべてのクライアントが整合性のとれたデータを⾒ることを保証 – 同時に実⾏される更新からデータを保護 – 更新が失敗した時などのハンドリング – インデックスとデータの整合性も保証 Ã 逆にトランザクション管理機構がなかったら上記の保証を全 てアプリケーションでやる必要がある
9.
9 © Hortonworks Inc. 2011 – 2016. All Rights Reserved なぜトランザクション管理機構が必要なのか Ã
アプリケーションの開発を容易にする – すべてのクライアントが整合性のとれたデータを⾒ることを保証 – 同時に実⾏される更新からデータを保護 – 更新が失敗した時などのハンドリング – インデックスとデータの整合性も保証 Ã 逆にトランザクション管理機構がなかったら上記の保証を全 てアプリケーションでやる必要がある HBaseでこれを実現するためのライブラリを調査した
10.
10 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBaseについて Ã
Googleの「Bigtable」のオープンソースクローン Ã いわゆる「NoSQL」の⼀つ Ã ペタバイトスケールの分散ストレージ – ⾼可⽤性 – スケーラブル – 低レイテンシー Ã よく使われるユースケース – ユーザのセッションDB – オブジェクトストア/メッセージストア – センサー系のアプリケーションのストレージ – グラフデータのためのストレージ
11.
11 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBaseのアーキテクチャ Master RegionServer
RegionServer RegionServer HDFS Zookeeper Client
12.
12 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBaseのアーキテクチャ Ã
TableのデータはRegionに分割 – RegionはいずれかのRegionServer に割り当てられる Ã RegionServerがダウンした場合 は割り当てられていたRegionは フェイルオーバされる Ã サイズが⼤きくなったRegionは分 割することが可能 Region1 RegionServers Region2 Region3 Region4 Region4 Region6
13.
13 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBaseのデータモデル Ã
分散ソートマップ – (row key, column, timestamp) -> value • columnはcolumn familyとcolumn qualifierで構成される • row key, columnでソートされている • timestampはバージョンを表している – Regionはrow keyの範囲で分割される row key column timestamp value row1 cf:col1 1000 value2 row1 cf:col2 1200 value4 row2 cf:col1 2000 value6 row3 cf:col1 1000 value3 row3 cf:col1 300 value1 row3 cf:col2 1500 value5
14.
14 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBaseにおけるトランザクションについて Ã
Row内の更新はアトミックに⾏われる – 複数columnを同時に変更しても途中の状態が⾒えることはない – IncrementやCASも可能 Ã Region内のバッチ処理もアトミックに⾏うことが可能 Ã 複数Regionにまたがる更新をアトミックに⾏うことはできない Ã 複数Tableにまたがる更新もアトミックに⾏うことはできない Ã 複数RPCの更新もアトミックに⾏うことはできない
15.
15 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBaseにおけるトランザクションについて Ã
Row内の更新はアトミックに⾏われる – 複数columnを同時に変更しても途中の状態が⾒えることはない – IncrementやCASも可能 Ã Region内のバッチ処理もアトミックに⾏うことが可能 Ã 複数Regionにまたがる更新をアトミックに⾏うことはできない Ã 複数Tableにまたがる更新もアトミックに⾏うことはできない Ã 複数RPCの更新もアトミックに⾏うことはできない HBaseは限定されたトランザクション管理機構しかない
16.
16 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBase上でトランザクションを実現しているライブラリ Ã
Tephra à Omid à Trafodion à Themis
17.
17 © Hortonworks Inc. 2011 – 2016. All Rights Reserved HBase上でトランザクションを実現しているライブラリ Ã
Tephra à Omid à Trafodion à Themis
18.
18 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Tephraについて
19.
19 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Tephra Ã
Apache Incubatorプロジェクト à Snapshot Isolationを実現 – Multi Version Concurrency Control – Optimistic Concurrency Control à Phoenixのトランザクション機能を実現するために⽤いられ ている
20.
20 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Snapshot
Isolation à 分離レベルの⼀つ à 以下の性質を持つ – トランザクションは⼀貫性のあるデータベースのスナップショッ ト(トランザクション開始時に存在していた最後にコミットされた 値)を読む – トランザクションの更新がスナップショット以降に他のトランザ クションがコミットした更新と競合しない場合に限りトランザク ションが成功する
21.
21 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Multi
Version Concurrency Control à トランザクションを開始時点のスナップショットを読むとい うやり⽅なので複数バージョンが存在できなければならない à HBaseのバージョン(timestamp)を利⽤した実装 à トランザクション内すべての更新は同じバージョン(トランザ クションID)を使って書き込まれる à トランザクション内の読み込みは、コミットされてないトラ ンザクションを除外する – データ取得時にtimestampの範囲を指定する à ⾃分のコミットされていない更新は⾒える
22.
22 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Optimistic
Concurrency Control à いわゆる楽観ロック à トランザクションの開始時には特に排他制御を⾏わず、コ ミット時に競合の検出を⾏うやり⽅ à 対照的なやり⽅としてはPessimistic Concurrency Control – いわゆる悲観ロック – トランザクション開始時に排他制御(主にロック等)を⾏う⽅法 à メリット – Tableやrowに対するロックのコストの回避 – デットロックやロックエスカレーションの回避 – 短いトランザクションにおいてコストが低くなる
23.
23 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Tephraのアーキテクチャ Client 1 Client 2 ・ ・ ・ Client N HBase Zookeeper Tx
Server (active) Tx Server (stanby) TransactionProcessor Coprocessor
24.
24 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションのライフサイクル start tx in progress Client
Tx serverRPC API do work try commit try abort start tx check conflicts complete invalid start commit none abort invalidate timeout rollback failed failed succeeded
25.
25 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1002 read = 1001 Client 2 row key column time stamp value row cf:col 1001 10 HBase
26.
26 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1002 read = 1001 write = 1002 read = 1001 Client 2 start row key column time stamp value row cf:col 1001 10 HBase
27.
27 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1003 read = 1001 inprogress=[1002] write = 1002 read = 1001 Client 2 start row key column time stamp value row cf:col 1001 10 HBase
28.
28 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1003 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 HBase write = 1002 read = 1001 Client 2 increment
29.
29 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1003 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 HBase write = 1002 read = 1001 Client 2 increment
30.
30 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1003 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 HBase write = 1002 read = 1001 Client 2 start write = 1003 read = 1001 exclude=[1002]
31.
31 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002, 1003] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 HBase write = 1002 read = 1001 Client 2 start write = 1003 read = 1001 exclude=[1002]
32.
32 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002, 1003] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 write = 1003 read = 1001 exclude=[1002] increment
33.
33 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002, 1003] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 write = 1003 read = 1001 exclude=[1002] commit
34.
34 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 write = 1003 read = 1001 exclude=[1002] commit
35.
35 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 commit
36.
36 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 conflict!
37.
37 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 rollback
38.
38 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 rollback
39.
39 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 abort
40.
40 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1001 inprogress=[] row key column time stamp value row cf:col 1001 10 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 abort
41.
41 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1004 read = 1003 inprogress=[] row key column time stamp value row cf:col 1001 10 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 abort
42.
42 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1005 read = 1003 inprogress=[] row key column time stamp value row cf:col 1001 10 row cf:col 1003 11 HBase Client 2 write = 1004 read = 1003 start
43.
43 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 Tx
Server write = 1005 read = 1003 inprogress=[] row key column time stamp value row cf:col 1001 10 row cf:col 1003 11 HBase Client 2 write = 1004 read = 1003 read
44.
44 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(ロールバックに失敗した時) Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 conflict!
45.
45 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(ロールバックに失敗した時) Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 rollback
46.
46 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(ロールバックに失敗した時) Client 1 Tx
Server write = 1004 read = 1001 inprogress=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 rollback
47.
47 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(ロールバックに失敗した時) Client 1 Tx
Server write = 1004 read = 1003 inprogress=[] invalid=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase write = 1002 read = 1001 Client 2 invalidate
48.
48 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(ロールバックに失敗した時) Client 1 Tx
Server write = 1005 read = 1003 inprogress=[] invalid=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase Client 2 start write = 1004 read = 1003 exclude=[1002]
49.
49 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(ロールバックに失敗した時) Client 1 Tx
Server write = 1005 read = 1003 inprogress=[] invalid=[1002] row key column time stamp value row cf:col 1001 10 row cf:col 1002 11 row cf:col 1003 11 HBase Client 2 read write = 1004 read = 1003 exclude=[1002] invisible!
50.
50 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れのポイント Ã
Transaction Server – トランザクションIDを管理 • Writeポインタ、Readポインタ – トランザクションの状態を管理 • in-progress, committed, invalid à トランザクション開始時にクライアントは以下を受け取る – Writeポインタ: HBaseへ書き込むtimestamp – Readポインタ: HBaseから読み込む上限のtimestamp – Excludes: 読み込まないtimestamp à 競合の検出はTransaction Serverが⾏う à 競合が検出されたらクライアントがロールバックする
51.
51 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Omidについて
52.
52 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Omid Ã
Apache Incubatorプロジェクト à Snapshot Isolation – Multi Version Concurrency Control – Lock-free à HiveのMetastoreの実装に⽤いられている à Yahooの本番環境で使われている
53.
53 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Omidのアーキテクチャ Transactional Client HBase The Server Oracle / Timestamp Oracle Commit Table App Table / Shadow Cells Compactor (Coprocessor)
54.
54 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table
55.
55 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table shadow cell Commit Table commit time
56.
56 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1003 begin
57.
57 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 begin start time = 1003
58.
58 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 increment start time = 1003
59.
59 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 increment start time = 1003 取得したいcellに対応す る(timestampが一致する) shadow cellを取得
60.
60 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 increment start time = 1003 そのshadow cellのvalue (1002) よりstart time(1003)が大きいの でスナップショットに入れること ができる
61.
61 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 increment start time = 1003
62.
62 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004commit start time = 1003
63.
63 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 start time = 1003 競合の検出 何もなければ… commit
64.
64 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time 1003 1004 TSO/TO Client 2 App Table Commit Table start time = 1003 timestamp = 1005 Commit Tableへ 書き込み
65.
65 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time 1003 1004 TSO/TO Client 2 App Table Commit Table start time = 1003 commit time = 1004 timestamp = 1005 commit time
66.
66 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1003 1004 row cf:col_sc 1001 1002 start time commit time 1003 1004 TSO/TO Client 2 App Table Commit Table start time = 1003 commit time = 1004 timestamp = 1005 shadow cellの書き込み
67.
67 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1003 1004 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table start time = 1003 commit time = 1004 timestamp = 1005 Commit Table から削除
68.
68 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 increment start time = 1003
69.
69 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1004 start time = 1003 begin
70.
70 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 begin start time = 1004
71.
71 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 increment
72.
72 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 increment 取得したいcellに対応する shadow cellが存在しない
73.
73 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 increment Commit Tableに存在する かも確認する
74.
74 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 increment Commit Tableにも存在しな いのでスナップショットに入 れることはできない
75.
75 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 increment 取得したいcellに対応する shadow cellが存在する
76.
76 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 そのshadow cellのvalue (1002) よりstart time(1004)が大きいの でスナップショットに入れること ができる increment
77.
77 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 increment
78.
78 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1005 start time = 1003 start time = 1004 commit 競合の検出 何もなければ…
79.
79 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time 1004 1005 TSO/TO Client 2 App Table Commit Table timestamp = 1006 start time = 1003 start time = 1004 Commit Tableへ 書き込み
80.
80 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1001 1002 start time commit time 1004 1005 TSO/TO Client 2 App Table Commit Table timestamp = 1006 start time = 1003 start time = 1004 commit time = 1005 commit time
81.
81 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1004 1005 row cf:col_sc 1001 1002 start time commit time 1004 1005 TSO/TO Client 2 App Table Commit Table timestamp = 1006 start time = 1003 start time = 1004 commit time = 1005 shadow cellの書き込み
82.
82 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1004 1005 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1006 start time = 1003 start time = 1004 commit time = 1005 Commit Table から削除
83.
83 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1004 1005 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1006 start time = 1003 commit
84.
84 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1004 1005 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1006 start time = 1003 commit 競合発生!
85.
85 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れ(競合が発⽣した時) Client 1 row key column
time stamp value row cf:col 1004 11 row cf:col 1003 11 row cf:col 1001 10 row cf:col_sc 1004 1005 row cf:col_sc 1001 1002 start time commit time TSO/TO Client 2 App Table Commit Table timestamp = 1006 トランザクション はabortされ rollbackする
86.
86 © Hortonworks Inc. 2011 – 2016. All Rights Reserved トランザクションの流れのポイント Ã
トランザクション開始時にTSO/TOからstart timeを受け取 る – それがトランザクションを表すトラザクションIDとなる – 読み込みにも書き込みにも使われる Ã Shadow Cell – そのデータがコミットされているかどうかの判定 – どのtimestmapにコミットされたか(commit time) Ã 競合の検出はTSO/TOで⾏われる Ã 競合が検出されたらクライアントはロールバックを⾏う
87.
87 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Tephra vs Omid
88.
88 © Hortonworks Inc. 2011 – 2016. All Rights Reserved TephraとOmidの⽐較表 Tephra
Omid バージョン 0.7.1 0.8.2.0 プロジェクト Apache Incubator Apache Incubator 実装言語 Java Java 分離レベル Snapshot Isolation Snapshot Isolation 実装 MVCC + OCC MVCC + lock-free API Java API (Phoenix経由でJDBC, REST等) Java API 対応している操作 get, put, delete, exists, scan, batch get, put, delete, scan HA 対応 対応 Read Only Transaction 非対応 対応 大きなユースケース Phoenix Hive Metastore ドキュメント (個人的な感想) △ △
89.
89 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
※結果はあくまでも参考値です。環境や設定、ワークロード によって結果は⼤きく変わる可能性があります。もしこれら のライブラリを使う場合は別途検証することをお勧めします Ã 環境 – Master × 1 CPU 4core, Memory 8GB – RegionServer × 3 CPU 4core, Memory 8GB – Transaction Server, TSO × 1 CPU 4core, Memory 8GB – 負荷を掛けるサーバ × 1 CPU 4core, Memory 8GB
90.
90 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
ワークロード – トランザクション開始 – 1000個のRowの中からランダムに選択 – 選択したRowに対してGet – 選択したRowに対してPut – トランザクション終了 – 100スレッドで上記ワークロードを30分間実⾏ • HBase直接(ライブラリなし)、Tephra、 Omid – 競合は3〜15%位発⽣していた
91.
91 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
結果 HBase直接 スループット (req/sec) 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690 720 750 780 810 840 870 900 930 960 990 1020 1050 1080 1110 1140 1170 1200 1230 1260 1290 1320 1350 1380 1410 1440 1470 1500 1530 1560 1590 1620 1650 1680 1710 1740 1770 1800 hbase throughput (req/sec)
92.
92 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
結果 HBase直接 レイテンシ (ms) 0 5 10 15 20 25 30 35 40 45 50 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690 720 750 780 810 840 870 900 930 960 990 1020 1050 1080 1110 1140 1170 1200 1230 1260 1290 1320 1350 1380 1410 1440 1470 1500 1530 1560 1590 1620 1650 1680 1710 1740 1770 1800 hbase latency (ms) mean p50 p75 p95 p98 p99
93.
93 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
結果 Tephra スループット (req/sec) 0 200 400 600 800 1000 1200 1400 1600 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690 720 750 780 810 840 870 900 930 960 990 1020 1050 1080 1110 1140 1170 1200 1230 1260 1290 1320 1350 1380 1410 1440 1470 1500 1530 1560 1590 1620 1650 1680 1710 1740 1770 1800 tephra throughput (req/sec)
94.
94 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
結果 Tephra レイテンシ (ms) 0 20 40 60 80 100 120 140 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690 720 750 780 810 840 870 900 930 960 990 1020 1050 1080 1110 1140 1170 1200 1230 1260 1290 1320 1350 1380 1410 1440 1470 1500 1530 1560 1590 1620 1650 1680 1710 1740 1770 1800 tephra latency (ms) mean p50 p75 p95 p98 p99
95.
95 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
結果 Omid スループット (req/sec) 0 500 1000 1500 2000 2500 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690 720 750 780 810 840 870 900 930 960 990 1020 1050 1080 1110 1140 1170 1200 1230 1260 1290 1320 1350 1380 1410 1440 1470 1500 1530 1560 1590 1620 1650 1680 1710 1740 1770 1800 omid throughput (req/sec)
96.
96 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
結果 Omid レイテンシ (ms) 0 20 40 60 80 100 120 140 160 180 200 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690 720 750 780 810 840 870 900 930 960 990 1020 1050 1080 1110 1140 1170 1200 1230 1260 1290 1320 1350 1380 1410 1440 1470 1500 1530 1560 1590 1620 1650 1680 1710 1740 1770 1800 omid latency (ms) mean p50 p75 p95 p98 p99
97.
97 © Hortonworks Inc. 2011 – 2016. All Rights Reserved ベンチマーク Ã
考察 – HBase直接と⽐較して、Tephra, Omidを使うとスループットが数 分の1まで遅くなる – TephraとOmidを⽐較すると若⼲Omidの⽅がパフォーマンスが良 かった • 今回はパフォーマンスチューニングまではできていないので、今後やっ てみたい – TephraのTransaction Serverと⽐較して、OmidのTSOの⽅が負 荷が⾼かった
98.
98 © Hortonworks Inc. 2011 – 2016. All Rights Reserved まとめ
99.
99 © Hortonworks Inc. 2011 – 2016. All Rights Reserved まとめ Ã
HBase上でトランザクションを実現するライブラリについて 解説 – Tephra – Omid à Tephra vs Omid – 機能の違い – 簡単なベンチマーク
100.
100 © Hortonworks Inc. 2011 – 2016. All Rights Reserved Thank You
Download