SlideShare a Scribd company logo
Test-suite for Automating
Data-consistency checks on HBase
Pradeep S, Mallikarjun V
Flipkart
• India’s largest online retailer:
• 10M page visits a day
• 2M shipments a day
• 30M products across more than 70 categories
• Big Billion Days ($300M sales, top ranked app on Google Play Store)
About Flipkart
Agenda
● Yak: HBase Cluster @ Flipkart
○ Need for scalable, multi-tenant, strongly consistent data stores
● Yak: Need for Data-correctness Guarantees
● Why Data-consistency Test-suite?
● How we did the Test-suite?
Yak: HBase Cluster @ Flipkart
● HBase for OLTP Key-Value store
● Bring-Your-Own-Box multi-tenancy on HBase
● RSGroup based isolation on HBase 1.2.4 & 2.1.3
● WAL based Change-Data-Capture into Kafka
● Stores critical data-sets in e-commerce like: Orders, Payments
Yak: Data-correctness Guarantees Required
● Read-Your-Own-Write consistency at single row level
● ‘Atleast-once’ guarantee in the change-data-capture
● Ordering guarantee in the change-data-capture
● Predictable recovery times, no data-loss upon failures
● Data-reliability for HBase admin operations
Why Data-consistency Test-suite?
● To enable faster upgrade cycles
● Releases dont degrading on the data-guarantees
● To assist in reproducing edge-cases scenarios
● To accommodate additional failure scenarios
Different Approaches for the Test-suite
● Algorithm testing: TLA+, etc.
● Code testing: Test suite of HBase, Hadoop, Zookeeper
● Testing on running cluster: Jepsen, ChaosMonkey & ITBLL of HBase, etc.
Different Approaches for the Test-suite
● Algorithm testing: TLA+, etc. - Implementation, Deployment NOT tested
● Code testing: Test suite of HBase - Deployment, Integration NOT tested
● Testing on running cluster: Jepsen, ChaosMonkey & ITBLL of HBase, etc.
Reason: Integrated test with { Algorithm + Code + Deployment }
Test-Suite
● Jepsen, ChaosMonkey based
● Test workload on HBase
● Simulated Interrupts:
○ Infrastructure failures
○ HBase component failures
○ Admin operations
● Test Report
Test-Suite - Test Workload
● Writes using CheckAndPut
● Observation points:
○ HBase Get
○ Kafka consumer from CDC
Test-Suite - Test Workload
Generate
Row Key1
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-1
rowkey = “key1”
col:v = 1
rowkey = “key1”
col:v = 2
rowkey = “key1”
col:v = 3
….
Test-Suite - Test Workload
Generate
Row-Key1
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-1
Generate
Row-Key2
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-2
Generate
Row-Key3
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-3
N Threads… on M Machines
Test-Suite - Assertions
Generate
Row-Key1
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-1
● Locally saved-state is compared against Get call result for no data-loss
For Key1 after every CheckAndPut:
Assert ( ThreadLocal<Version> == Version from HBase )
Test-Suite - Assertions
Generate
Row-Key1
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-1
● Kafka listener reads the events of the key:
For a key1 having writes as: 1,2,3,4
1,2,2,2,3,4
1,2,3,2,3,4
1,2,4,2,3,4
1,2,4
For the key1:
Assert (
read event version <=
latest seen version +1
)
Test-Suite - Assertions
Generate
Row-Key1
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-1
● HBase regions of a table are within the RSGroup nodes
● HDFS data-blocks stored within the RSGroup nodes
Assert (Region Assignment within RSGroup Nodes)
Assert (HDFS blocks within RSGroup Nodes)
Test-Suite - Assertions
Generate
Row-Key1
CheckPut
col:v = 1
Save
Locally
Get CheckPut
col:v = 2
Save
Locally
Get CheckPut
col:v = 3
Save
Locally
Get …...
Thread-1
● Locally saved-state is compared against Get call result for no data-loss
● Kafka listener reads the events of the key:
○ To assert no data-loss as the versions are incremental
○ To assert no-ordering loss
● RSGroup isolation checks: WAL & HDFS data-blocks & Region Assignment
Interruptions
● Simulate issue & heal
● Types of Interruptions:
○ Infrastructure failures
○ HBase component failures
○ HBase admin operations
Interruptions - Infrastructure Failures
● Network failures:
○ Network partition/failure: within zookeeper, region-servers, namenode etc.
○ Packet loss: within zookeeper, master, region-servers, namenode etc.
○ Tools: iptables, tc, comcast
● Other failure modes - to be added:
○ Clock skew
○ Packet delays
○ Disk read-only etc
Interruptions - Component Failures
● Kill hbase components:
○ region-server, master-node, zookeeper
● Kill hadoop components:
○ data-node, journal-node, name-node
● Node crash:
○ region-server-node, master-node, name-node, zookeeper, journal-node
Interruptions - HBase Admin Operations
● Split/merge region
● Assign/move region
● Restart: region-server, data-node
● Stop: region-server, data-node, etc.
● Kafka properties reload for CDC
Issues Uncovered & Fixed
● Assign an already assigned region causing data-loss - Fixed in 2.x
● Ordering loss in tail process from WAL file upon a region failover - Fixed in 2.x
● WAL not-isolated across region-server group - HBASE-21641
● Migration to HBase ChaosMonkey for Interruptions
● Opensource the test-suite
● WAL push to Kafka - https://github.com/flipkart-incubator/hbase-sep
Further Plans
Thanks!
Appendix
● Tests are not deterministic. Needs 100s of iterations.
● Doesn’t catch all the bugs. But catches the practical issues for the specific
use-case.
Limitations
Test-Suite - Sample Report
Ad

Recommended

hbaseconasia2017: HBase Practice At XiaoMi
hbaseconasia2017: HBase Practice At XiaoMi
HBaseCon
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynote
Marco Tusa
 
ProxySQL for MySQL
ProxySQL for MySQL
Mydbops
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0
HBaseCon
 
HBaseCon2017 Analyzing cryptocurrencies in real time with hBase, Kafka and St...
HBaseCon2017 Analyzing cryptocurrencies in real time with hBase, Kafka and St...
HBaseCon
 
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
PostgreSQL-Consulting
 
What’s new in Galera 4
What’s new in Galera 4
MariaDB plc
 
Inside CynosDB: MariaDB optimized for the cloud at Tencent
Inside CynosDB: MariaDB optimized for the cloud at Tencent
MariaDB plc
 
hbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: Apache HBase at Netease
HBaseCon
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
René Cannaò
 
Google Cloud & Your Data
Google Cloud & Your Data
Mike Fowler
 
The Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQL
Ashnikbiz
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon
 
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
EDB
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
MariaDB plc
 
Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®
MariaDB plc
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDB
MariaDB plc
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
HBaseCon
 
Configuring workload-based storage and topologies
Configuring workload-based storage and topologies
MariaDB plc
 
Breaking the Sound Barrier with Persistent Memory
Breaking the Sound Barrier with Persistent Memory
HBaseCon
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon
 
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Ashnikbiz
 
Overview of Postgres Utility Processes
Overview of Postgres Utility Processes
EDB
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
Mydbops
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
Mongo db v3_deep_dive
Mongo db v3_deep_dive
Bryan Reinero
 
[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)
baggioss
 
NoSql day 2019 - Floating on a Raft - Apache HBase durability with Apache Ratis
NoSql day 2019 - Floating on a Raft - Apache HBase durability with Apache Ratis
Ankit Singhal
 

More Related Content

What's hot (20)

Inside CynosDB: MariaDB optimized for the cloud at Tencent
Inside CynosDB: MariaDB optimized for the cloud at Tencent
MariaDB plc
 
hbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: Apache HBase at Netease
HBaseCon
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
René Cannaò
 
Google Cloud & Your Data
Google Cloud & Your Data
Mike Fowler
 
The Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQL
Ashnikbiz
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon
 
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
EDB
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
MariaDB plc
 
Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®
MariaDB plc
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDB
MariaDB plc
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
HBaseCon
 
Configuring workload-based storage and topologies
Configuring workload-based storage and topologies
MariaDB plc
 
Breaking the Sound Barrier with Persistent Memory
Breaking the Sound Barrier with Persistent Memory
HBaseCon
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon
 
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Ashnikbiz
 
Overview of Postgres Utility Processes
Overview of Postgres Utility Processes
EDB
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
Mydbops
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
Mongo db v3_deep_dive
Mongo db v3_deep_dive
Bryan Reinero
 
Inside CynosDB: MariaDB optimized for the cloud at Tencent
Inside CynosDB: MariaDB optimized for the cloud at Tencent
MariaDB plc
 
hbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: Apache HBase at Netease
HBaseCon
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
René Cannaò
 
Google Cloud & Your Data
Google Cloud & Your Data
Mike Fowler
 
The Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQL
Ashnikbiz
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon
 
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
EDB
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
MariaDB plc
 
Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®
MariaDB plc
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDB
MariaDB plc
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
HBaseCon
 
Configuring workload-based storage and topologies
Configuring workload-based storage and topologies
MariaDB plc
 
Breaking the Sound Barrier with Persistent Memory
Breaking the Sound Barrier with Persistent Memory
HBaseCon
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon
 
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Ashnikbiz
 
Overview of Postgres Utility Processes
Overview of Postgres Utility Processes
EDB
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
Mydbops
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
Mongo db v3_deep_dive
Mongo db v3_deep_dive
Bryan Reinero
 

Similar to hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase (20)

[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)
baggioss
 
NoSql day 2019 - Floating on a Raft - Apache HBase durability with Apache Ratis
NoSql day 2019 - Floating on a Raft - Apache HBase durability with Apache Ratis
Ankit Singhal
 
Rolling Out Apache HBase for Mobile Offerings at Visa
Rolling Out Apache HBase for Mobile Offerings at Visa
HBaseCon
 
Storage Infrastructure Behind Facebook Messages
Storage Infrastructure Behind Facebook Messages
feng1212
 
Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...
Omid Vahdaty
 
Facebook keynote-nicolas-qcon
Facebook keynote-nicolas-qcon
Yiwei Ma
 
支撑Facebook消息处理的h base存储系统
支撑Facebook消息处理的h base存储系统
yongboy
 
Facebook Messages & HBase
Facebook Messages & HBase
强 王
 
Apache HBase Improvements and Practices at Xiaomi
Apache HBase Improvements and Practices at Xiaomi
HBaseCon
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache Ratis
DataWorks Summit
 
Putting Wings on the Elephant
Putting Wings on the Elephant
DataWorks Summit
 
Hadoop World 2011: Building Realtime Big Data Services at Facebook with Hadoo...
Hadoop World 2011: Building Realtime Big Data Services at Facebook with Hadoo...
Cloudera, Inc.
 
HBase: Where Online Meets Low Latency
HBase: Where Online Meets Low Latency
HBaseCon
 
HBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon
 
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
Redis Labs
 
HBase Low Latency, StrataNYC 2014
HBase Low Latency, StrataNYC 2014
Nick Dimiduk
 
HBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBase
enissoz
 
HBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBase
HBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBase
Cloudera, Inc.
 
HBaseConAsia2018 Track3-7: The application of HBase in New Energy Vehicle Mon...
HBaseConAsia2018 Track3-7: The application of HBase in New Energy Vehicle Mon...
Michael Stack
 
Facebook - Jonthan Gray - Hadoop World 2010
Facebook - Jonthan Gray - Hadoop World 2010
Cloudera, Inc.
 
[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)
baggioss
 
NoSql day 2019 - Floating on a Raft - Apache HBase durability with Apache Ratis
NoSql day 2019 - Floating on a Raft - Apache HBase durability with Apache Ratis
Ankit Singhal
 
Rolling Out Apache HBase for Mobile Offerings at Visa
Rolling Out Apache HBase for Mobile Offerings at Visa
HBaseCon
 
Storage Infrastructure Behind Facebook Messages
Storage Infrastructure Behind Facebook Messages
feng1212
 
Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...
Omid Vahdaty
 
Facebook keynote-nicolas-qcon
Facebook keynote-nicolas-qcon
Yiwei Ma
 
支撑Facebook消息处理的h base存储系统
支撑Facebook消息处理的h base存储系统
yongboy
 
Facebook Messages & HBase
Facebook Messages & HBase
强 王
 
Apache HBase Improvements and Practices at Xiaomi
Apache HBase Improvements and Practices at Xiaomi
HBaseCon
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache Ratis
DataWorks Summit
 
Putting Wings on the Elephant
Putting Wings on the Elephant
DataWorks Summit
 
Hadoop World 2011: Building Realtime Big Data Services at Facebook with Hadoo...
Hadoop World 2011: Building Realtime Big Data Services at Facebook with Hadoo...
Cloudera, Inc.
 
HBase: Where Online Meets Low Latency
HBase: Where Online Meets Low Latency
HBaseCon
 
HBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon
 
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
Redis Labs
 
HBase Low Latency, StrataNYC 2014
HBase Low Latency, StrataNYC 2014
Nick Dimiduk
 
HBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBase
enissoz
 
HBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBase
HBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBase
Cloudera, Inc.
 
HBaseConAsia2018 Track3-7: The application of HBase in New Energy Vehicle Mon...
HBaseConAsia2018 Track3-7: The application of HBase in New Energy Vehicle Mon...
Michael Stack
 
Facebook - Jonthan Gray - Hadoop World 2010
Facebook - Jonthan Gray - Hadoop World 2010
Cloudera, Inc.
 
Ad

More from Michael Stack (20)

hbaseconasia2019 HBase Table Monitoring and Troubleshooting System on Cloud
hbaseconasia2019 HBase Table Monitoring and Troubleshooting System on Cloud
Michael Stack
 
hbaseconasia2019 Recent work on HBase at Pinterest
hbaseconasia2019 Recent work on HBase at Pinterest
Michael Stack
 
hbaseconasia2019 Phoenix Practice in China Life Insurance Co., Ltd
hbaseconasia2019 Phoenix Practice in China Life Insurance Co., Ltd
Michael Stack
 
hbaseconasia2019 HBase at Didi
hbaseconasia2019 HBase at Didi
Michael Stack
 
hbaseconasia2019 The Practice in trillion-level Video Storage and billion-lev...
hbaseconasia2019 The Practice in trillion-level Video Storage and billion-lev...
Michael Stack
 
hbaseconasia2019 HBase at Tencent
hbaseconasia2019 HBase at Tencent
Michael Stack
 
hbaseconasia2019 Spatio temporal Data Management based on Ali-HBase Ganos and...
hbaseconasia2019 Spatio temporal Data Management based on Ali-HBase Ganos and...
Michael Stack
 
hbaseconasia2019 Bridging the Gap between Big Data System Software Stack and ...
hbaseconasia2019 Bridging the Gap between Big Data System Software Stack and ...
Michael Stack
 
hbaseconasia2019 Pharos as a Pluggable Secondary Index Component
hbaseconasia2019 Pharos as a Pluggable Secondary Index Component
Michael Stack
 
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
Michael Stack
 
hbaseconasia2019 OpenTSDB at Xiaomi
hbaseconasia2019 OpenTSDB at Xiaomi
Michael Stack
 
hbaseconasia2019 BigData NoSQL System: ApsaraDB, HBase and Spark
hbaseconasia2019 BigData NoSQL System: ApsaraDB, HBase and Spark
Michael Stack
 
hbaseconasia2019 Distributed Bitmap Index Solution
hbaseconasia2019 Distributed Bitmap Index Solution
Michael Stack
 
hbaseconasia2019 HBase Bucket Cache on Persistent Memory
hbaseconasia2019 HBase Bucket Cache on Persistent Memory
Michael Stack
 
hbaseconasia2019 The Procedure v2 Implementation of WAL Splitting and ACL
hbaseconasia2019 The Procedure v2 Implementation of WAL Splitting and ACL
Michael Stack
 
hbaseconasia2019 BDS: A data synchronization platform for HBase
hbaseconasia2019 BDS: A data synchronization platform for HBase
Michael Stack
 
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
Michael Stack
 
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
Michael Stack
 
HBaseConAsia2019 Keynote
HBaseConAsia2019 Keynote
Michael Stack
 
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
Michael Stack
 
hbaseconasia2019 HBase Table Monitoring and Troubleshooting System on Cloud
hbaseconasia2019 HBase Table Monitoring and Troubleshooting System on Cloud
Michael Stack
 
hbaseconasia2019 Recent work on HBase at Pinterest
hbaseconasia2019 Recent work on HBase at Pinterest
Michael Stack
 
hbaseconasia2019 Phoenix Practice in China Life Insurance Co., Ltd
hbaseconasia2019 Phoenix Practice in China Life Insurance Co., Ltd
Michael Stack
 
hbaseconasia2019 HBase at Didi
hbaseconasia2019 HBase at Didi
Michael Stack
 
hbaseconasia2019 The Practice in trillion-level Video Storage and billion-lev...
hbaseconasia2019 The Practice in trillion-level Video Storage and billion-lev...
Michael Stack
 
hbaseconasia2019 HBase at Tencent
hbaseconasia2019 HBase at Tencent
Michael Stack
 
hbaseconasia2019 Spatio temporal Data Management based on Ali-HBase Ganos and...
hbaseconasia2019 Spatio temporal Data Management based on Ali-HBase Ganos and...
Michael Stack
 
hbaseconasia2019 Bridging the Gap between Big Data System Software Stack and ...
hbaseconasia2019 Bridging the Gap between Big Data System Software Stack and ...
Michael Stack
 
hbaseconasia2019 Pharos as a Pluggable Secondary Index Component
hbaseconasia2019 Pharos as a Pluggable Secondary Index Component
Michael Stack
 
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
Michael Stack
 
hbaseconasia2019 OpenTSDB at Xiaomi
hbaseconasia2019 OpenTSDB at Xiaomi
Michael Stack
 
hbaseconasia2019 BigData NoSQL System: ApsaraDB, HBase and Spark
hbaseconasia2019 BigData NoSQL System: ApsaraDB, HBase and Spark
Michael Stack
 
hbaseconasia2019 Distributed Bitmap Index Solution
hbaseconasia2019 Distributed Bitmap Index Solution
Michael Stack
 
hbaseconasia2019 HBase Bucket Cache on Persistent Memory
hbaseconasia2019 HBase Bucket Cache on Persistent Memory
Michael Stack
 
hbaseconasia2019 The Procedure v2 Implementation of WAL Splitting and ACL
hbaseconasia2019 The Procedure v2 Implementation of WAL Splitting and ACL
Michael Stack
 
hbaseconasia2019 BDS: A data synchronization platform for HBase
hbaseconasia2019 BDS: A data synchronization platform for HBase
Michael Stack
 
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
Michael Stack
 
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
Michael Stack
 
HBaseConAsia2019 Keynote
HBaseConAsia2019 Keynote
Michael Stack
 
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
Michael Stack
 
Ad

Recently uploaded (20)

BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
AhmadAli716831
 
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
taqyed
 
The ARUBA Kind of new Proposal Umum .pptx
The ARUBA Kind of new Proposal Umum .pptx
andiwarneri
 
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
 
BitRecover OST to PST Converter Software
BitRecover OST to PST Converter Software
antoniogosling01
 
Logging and Automated Alerting Webinar.pdf
Logging and Automated Alerting Webinar.pdf
ControlCase
 
TCP/IP presentation SET2- Information Systems
TCP/IP presentation SET2- Information Systems
agnesegtcagliero
 
inside the internet - understanding the TCP/IP protocol
inside the internet - understanding the TCP/IP protocol
shainweniton02
 
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
taqyea
 
Make DDoS expensive for the threat actors
Make DDoS expensive for the threat actors
APNIC
 
history of internet in nepal Class-8 (sparsha).pptx
history of internet in nepal Class-8 (sparsha).pptx
SPARSH508080
 
原版一样(ISM毕业证书)德国多特蒙德国际管理学院毕业证多少钱
原版一样(ISM毕业证书)德国多特蒙德国际管理学院毕业证多少钱
taqyed
 
ChatGPT_and_Its_Uses_Presentationss.pptx
ChatGPT_and_Its_Uses_Presentationss.pptx
Neha Prakash
 
原版一样(ANU毕业证书)澳洲澳大利亚国立大学毕业证在线购买
原版一样(ANU毕业证书)澳洲澳大利亚国立大学毕业证在线购买
Taqyea
 
DDoS in India, presented at INNOG 8 by Dave Phelan
DDoS in India, presented at INNOG 8 by Dave Phelan
APNIC
 
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
 
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
AhmadAli716831
 
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
Mostofa Kamal Al-Azad
 
Pitch PitchPitchPitchPitchPitchPitch.pptx
Pitch PitchPitchPitchPitchPitchPitch.pptx
157551
 
Paper: The World Game (s) Great Redesign.pdf
Paper: The World Game (s) Great Redesign.pdf
Steven McGee
 
BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
BASICS OF SAP _ ALL ABOUT SAP _WHY SAP OVER ANY OTHER ERP SYSTEM
AhmadAli716831
 
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
taqyed
 
The ARUBA Kind of new Proposal Umum .pptx
The ARUBA Kind of new Proposal Umum .pptx
andiwarneri
 
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
 
BitRecover OST to PST Converter Software
BitRecover OST to PST Converter Software
antoniogosling01
 
Logging and Automated Alerting Webinar.pdf
Logging and Automated Alerting Webinar.pdf
ControlCase
 
TCP/IP presentation SET2- Information Systems
TCP/IP presentation SET2- Information Systems
agnesegtcagliero
 
inside the internet - understanding the TCP/IP protocol
inside the internet - understanding the TCP/IP protocol
shainweniton02
 
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
taqyea
 
Make DDoS expensive for the threat actors
Make DDoS expensive for the threat actors
APNIC
 
history of internet in nepal Class-8 (sparsha).pptx
history of internet in nepal Class-8 (sparsha).pptx
SPARSH508080
 
原版一样(ISM毕业证书)德国多特蒙德国际管理学院毕业证多少钱
原版一样(ISM毕业证书)德国多特蒙德国际管理学院毕业证多少钱
taqyed
 
ChatGPT_and_Its_Uses_Presentationss.pptx
ChatGPT_and_Its_Uses_Presentationss.pptx
Neha Prakash
 
原版一样(ANU毕业证书)澳洲澳大利亚国立大学毕业证在线购买
原版一样(ANU毕业证书)澳洲澳大利亚国立大学毕业证在线购买
Taqyea
 
DDoS in India, presented at INNOG 8 by Dave Phelan
DDoS in India, presented at INNOG 8 by Dave Phelan
APNIC
 
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
 
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
PROCESS FOR CREATION OF BUSINESS PARTNER IN SAP
AhmadAli716831
 
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
Mostofa Kamal Al-Azad
 
Pitch PitchPitchPitchPitchPitchPitch.pptx
Pitch PitchPitchPitchPitchPitchPitch.pptx
157551
 
Paper: The World Game (s) Great Redesign.pdf
Paper: The World Game (s) Great Redesign.pdf
Steven McGee
 

hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase

  • 1. Test-suite for Automating Data-consistency checks on HBase Pradeep S, Mallikarjun V Flipkart
  • 2. • India’s largest online retailer: • 10M page visits a day • 2M shipments a day • 30M products across more than 70 categories • Big Billion Days ($300M sales, top ranked app on Google Play Store) About Flipkart
  • 3. Agenda ● Yak: HBase Cluster @ Flipkart ○ Need for scalable, multi-tenant, strongly consistent data stores ● Yak: Need for Data-correctness Guarantees ● Why Data-consistency Test-suite? ● How we did the Test-suite?
  • 4. Yak: HBase Cluster @ Flipkart ● HBase for OLTP Key-Value store ● Bring-Your-Own-Box multi-tenancy on HBase ● RSGroup based isolation on HBase 1.2.4 & 2.1.3 ● WAL based Change-Data-Capture into Kafka ● Stores critical data-sets in e-commerce like: Orders, Payments
  • 5. Yak: Data-correctness Guarantees Required ● Read-Your-Own-Write consistency at single row level ● ‘Atleast-once’ guarantee in the change-data-capture ● Ordering guarantee in the change-data-capture ● Predictable recovery times, no data-loss upon failures ● Data-reliability for HBase admin operations
  • 6. Why Data-consistency Test-suite? ● To enable faster upgrade cycles ● Releases dont degrading on the data-guarantees ● To assist in reproducing edge-cases scenarios ● To accommodate additional failure scenarios
  • 7. Different Approaches for the Test-suite ● Algorithm testing: TLA+, etc. ● Code testing: Test suite of HBase, Hadoop, Zookeeper ● Testing on running cluster: Jepsen, ChaosMonkey & ITBLL of HBase, etc.
  • 8. Different Approaches for the Test-suite ● Algorithm testing: TLA+, etc. - Implementation, Deployment NOT tested ● Code testing: Test suite of HBase - Deployment, Integration NOT tested ● Testing on running cluster: Jepsen, ChaosMonkey & ITBLL of HBase, etc. Reason: Integrated test with { Algorithm + Code + Deployment }
  • 9. Test-Suite ● Jepsen, ChaosMonkey based ● Test workload on HBase ● Simulated Interrupts: ○ Infrastructure failures ○ HBase component failures ○ Admin operations ● Test Report
  • 10. Test-Suite - Test Workload ● Writes using CheckAndPut ● Observation points: ○ HBase Get ○ Kafka consumer from CDC
  • 11. Test-Suite - Test Workload Generate Row Key1 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-1 rowkey = “key1” col:v = 1 rowkey = “key1” col:v = 2 rowkey = “key1” col:v = 3 ….
  • 12. Test-Suite - Test Workload Generate Row-Key1 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-1 Generate Row-Key2 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-2 Generate Row-Key3 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-3 N Threads… on M Machines
  • 13. Test-Suite - Assertions Generate Row-Key1 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-1 ● Locally saved-state is compared against Get call result for no data-loss For Key1 after every CheckAndPut: Assert ( ThreadLocal<Version> == Version from HBase )
  • 14. Test-Suite - Assertions Generate Row-Key1 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-1 ● Kafka listener reads the events of the key: For a key1 having writes as: 1,2,3,4 1,2,2,2,3,4 1,2,3,2,3,4 1,2,4,2,3,4 1,2,4 For the key1: Assert ( read event version <= latest seen version +1 )
  • 15. Test-Suite - Assertions Generate Row-Key1 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-1 ● HBase regions of a table are within the RSGroup nodes ● HDFS data-blocks stored within the RSGroup nodes Assert (Region Assignment within RSGroup Nodes) Assert (HDFS blocks within RSGroup Nodes)
  • 16. Test-Suite - Assertions Generate Row-Key1 CheckPut col:v = 1 Save Locally Get CheckPut col:v = 2 Save Locally Get CheckPut col:v = 3 Save Locally Get …... Thread-1 ● Locally saved-state is compared against Get call result for no data-loss ● Kafka listener reads the events of the key: ○ To assert no data-loss as the versions are incremental ○ To assert no-ordering loss ● RSGroup isolation checks: WAL & HDFS data-blocks & Region Assignment
  • 17. Interruptions ● Simulate issue & heal ● Types of Interruptions: ○ Infrastructure failures ○ HBase component failures ○ HBase admin operations
  • 18. Interruptions - Infrastructure Failures ● Network failures: ○ Network partition/failure: within zookeeper, region-servers, namenode etc. ○ Packet loss: within zookeeper, master, region-servers, namenode etc. ○ Tools: iptables, tc, comcast ● Other failure modes - to be added: ○ Clock skew ○ Packet delays ○ Disk read-only etc
  • 19. Interruptions - Component Failures ● Kill hbase components: ○ region-server, master-node, zookeeper ● Kill hadoop components: ○ data-node, journal-node, name-node ● Node crash: ○ region-server-node, master-node, name-node, zookeeper, journal-node
  • 20. Interruptions - HBase Admin Operations ● Split/merge region ● Assign/move region ● Restart: region-server, data-node ● Stop: region-server, data-node, etc. ● Kafka properties reload for CDC
  • 21. Issues Uncovered & Fixed ● Assign an already assigned region causing data-loss - Fixed in 2.x ● Ordering loss in tail process from WAL file upon a region failover - Fixed in 2.x ● WAL not-isolated across region-server group - HBASE-21641
  • 22. ● Migration to HBase ChaosMonkey for Interruptions ● Opensource the test-suite ● WAL push to Kafka - https://github.com/flipkart-incubator/hbase-sep Further Plans
  • 25. ● Tests are not deterministic. Needs 100s of iterations. ● Doesn’t catch all the bugs. But catches the practical issues for the specific use-case. Limitations