The State of HBase Replication

HBaseCon
1
The State of HBase Replication
Jean-Daniel Cryans
May 5th, 2014
©2014 Cloudera, Inc. All rights reserved.
About me
2
• Software Engineer at Cloudera, Storage team
• Apache HBase committer since 2008, PMC
member
©2014 Cloudera, Inc. All rights reserved.
Motivation for HBase Replication
• Even though HBase is:
3
©2014 Cloudera, Inc. All rights reserved.
Motivation for HBase Replication
• Even though HBase is:
• distributed;
3
©2014 Cloudera, Inc. All rights reserved.
Motivation for HBase Replication
• Even though HBase is:
• distributed;
• fault-tolerant;
3
©2014 Cloudera, Inc. All rights reserved.
Motivation for HBase Replication
• Even though HBase is:
• distributed;
• fault-tolerant;
• highly available; and
3
©2014 Cloudera, Inc. All rights reserved.
Motivation for HBase Replication
• Even though HBase is:
• distributed;
• fault-tolerant;
• highly available; and
• almost magic.
3
©2014 Cloudera, Inc. All rights reserved.
Motivation for HBase Replication
• Even though HBase is:
• distributed;
• fault-tolerant;
• highly available; and
• almost magic.
3
©2014 Cloudera, Inc. All rights reserved.
The Current State
• It’s production-ready.
4
©2014 Cloudera, Inc. All rights reserved.
The Current State
• It’s production-ready.
• It’s used to replicate data between thousands
of nodes across continents.
4
©2014 Cloudera, Inc. All rights reserved.
The Current State
• It’s production-ready.
• It’s used to replicate data between thousands
of nodes across continents.
• It’s used for Disaster Recovery, geo-
distributed serving, and more.
4
©2014 Cloudera, Inc. All rights reserved.
5
Agenda
• Four Years of Replication
• Use Cases in Production
• Roadmap
©2014 Cloudera, Inc. All rights reserved.
Design
• Clusters are distinct
• Pull VS push
• Sync VS Async
6
©2014 Cloudera, Inc. All rights reserved.
Clusters are Distinct
• HBase doesn’t span DCs, HDFSs
7
Master
20 RS
Slave
15 RS
©2014 Cloudera, Inc. All rights reserved.
Clusters are Distinct
• HBase doesn’t span DCs, HDFSs
• .META. operations aren’t replicated
7
Master
20 RS
Slave
15 RS
©2014 Cloudera, Inc. All rights reserved.
Clusters are Distinct
• HBase doesn’t span DCs, HDFSs
• .META. operations aren’t replicated
• Regions can be different
7
Master
20 RS
Slave
15 RS
©2014 Cloudera, Inc. All rights reserved.
Clusters are Distinct
• HBase doesn’t span DCs, HDFSs
• .META. operations aren’t replicated
• Regions can be different
• Security has to be configured for each cluster
7
Master
20 RS
Slave
15 RS
©2014 Cloudera, Inc. All rights reserved.
Push instead of Pull
8
MySQL
Master
MySQL
Slave
Get binlog
Apply locally
MySQL Replication uses Pull
Cluster A Cluster B
©2014 Cloudera, Inc. All rights reserved.
Push instead of Pull
9
RS RSreplicate entries
Apply to cluster
HBase Replication uses Push
Cluster A Cluster B
©2014 Cloudera, Inc. All rights reserved.
Async instead of Sync
10
Cluster A Cluster B
RS
HLog
MemStore
RS
HLog
MemStore
Synchronous Replication
©2014 Cloudera, Inc. All rights reserved.
Async instead of Sync
10
Cluster A Cluster B
RS
HLog
MemStore
RS
HLog
MemStore
Put
2
3
1
Synchronous Replication
©2014 Cloudera, Inc. All rights reserved.
Async instead of Sync
10
Cluster A Cluster B
RS
HLog
MemStore
RS
HLog
MemStore
Put
2
3
1
Ack Ack
Put
5
6
4
78
Synchronous Replication
©2014 Cloudera, Inc. All rights reserved.
Async instead of Sync
11
Asynchronous Replication
©2014 Cloudera, Inc. All rights reserved.
Async instead of Sync
11
Asynchronous Replication
Cluster A
RS
HLog
MemStore
Put
Ack
2
3
1
4
©2014 Cloudera, Inc. All rights reserved.
Async instead of Sync
11
Asynchronous Replication
Cluster A
RS
HLog
MemStore
Put
Ack
2
3
1
4
Cluster B
RS
HLog
MemStore
Ack
Put
3
4
2
5
HLog
Tailing
Thread
1
©2014 Cloudera, Inc. All rights reserved.
First Release - 0.90.0
• Simple master-slave (only one)
• Disabled by default
• Uses ZK as a metadata store
12
©2014 Cloudera, Inc. All rights reserved.
Original Implementation
13
replicateLogEntries()Replication
Source
ZooKeeper
Watcher
Region Server on
Master Cluster
Replication
Sink
HTable
Put
Delete
Region Server on
Slave Cluster
©2014 Cloudera, Inc. All rights reserved.
First Lesson Learned
• HDFS doesn’t support tailing files being
written to. It requires:
• open()
• seek()// go where we stopped last time
• while (not EOF || enoughData)
• read()
• close()
• repeat
14
©2014 Cloudera, Inc. All rights reserved.
Second Lesson Learned
• Single threaded, non-batched ZK is slow
• ZK didn’t have an atomic move operation
• Doubles # ops needed, race conditions
15
©2014 Cloudera, Inc. All rights reserved.
Second Lesson Learned
• Single threaded, non-batched ZK is slow
• ZK didn’t have an atomic move operation
• Doubles # ops needed, race conditions
15
/hbase
/replication
/RS1
/1
/hlog1
/hlog2
...
/hbase
/replication
/RS2
/1-RS1
/hlog1
1. create new hlog2
2. delete old hlog2
©2014 Cloudera, Inc. All rights reserved.
Second Release - 0.92.0
• Cyclic replication
• Multi-slave (scope LOCAL or GLOBAL)
• Enable / disable peer
• Special configurations
16
©2014 Cloudera, Inc. All rights reserved.
Cyclic Replication
17
Cluster
1
Cluster
2
Cluster
3
Put Row X
©2014 Cloudera, Inc. All rights reserved.
Cyclic Replication
17
Cluster
1
Cluster
2
Cluster
3
Put Row X
Put Row X
©2014 Cloudera, Inc. All rights reserved.
Cyclic Replication
17
Cluster
1
Cluster
2
Cluster
3
Put Row X
Put Row X
Put Row X
©2014 Cloudera, Inc. All rights reserved.
Cyclic Replication
17
Cluster
1
Cluster
2
Cluster
3
Put Row X
Put Row X
Put Row X
Row X is from 1
Don’t replicate!
©2014 Cloudera, Inc. All rights reserved.
Multi-Slave
18
Cluster
1
Cluster
2
Cluster
3
Put Row X
©2014 Cloudera, Inc. All rights reserved.
Multi-Slave
18
Cluster
1
Cluster
2
Cluster
3
Put Row X
Put Row X
©2014 Cloudera, Inc. All rights reserved.
Multi-Slave
18
Cluster
1
Cluster
2
Cluster
3
Put Row X
Put Row X Put Row X
©2014 Cloudera, Inc. All rights reserved.
Enable / Disable Peers
19
Cluster 1
RS
HLog
Cluster 2
RSHLog
Tailing
Thread
©2014 Cloudera, Inc. All rights reserved.
Enable / Disable Peers
> disable_peer ‘2’
19
Cluster 1
RS
HLog
Cluster 2
RSHLog
Tailing
Thread
Is the peer enabled?
©2014 Cloudera, Inc. All rights reserved.
Enable / Disable Peers
> disable_peer ‘2’
19
Cluster 1
RS
HLog
Cluster 2
RSHLog
Tailing
Thread
HLog
Is the peer enabled?
©2014 Cloudera, Inc. All rights reserved.
Enable / Disable Peers
> disable_peer ‘2’
19
Cluster 1
RS
HLog
Cluster 2
RSHLog
Tailing
Thread
HLog
HLog
Is the peer enabled?
©2014 Cloudera, Inc. All rights reserved.
Enable / Disable Peers
> disable_peer ‘2’
19
Cluster 1
RS
HLog
Cluster 2
RSHLog
Tailing
Thread
HLog
HLog
HLog
Is the peer enabled?
©2014 Cloudera, Inc. All rights reserved.
Enable / Disable Peers
> disable_peer ‘2’
19
Cluster 1
RS
HLog
Cluster 2
RSHLog
Tailing
Thread
HLog
HLog
HLog
HLog
Is the peer enabled?
©2014 Cloudera, Inc. All rights reserved.
Enable / Disable Peers
> disable_peer ‘2’
19
Cluster 1
RS
HLog
Cluster 2
RSHLog
Tailing
Thread
HLog
HLog
HLog
HLog
HLog
Is the peer enabled?
©2014 Cloudera, Inc. All rights reserved.
Special Configurations
• KEEP_DELETED_CELLS
• Must be used on slaves with replication when
deleting data.
20
©2014 Cloudera, Inc. All rights reserved.
Special Configurations
• KEEP_DELETED_CELLS
• Must be used on slaves with replication when
deleting data.
• MIN_VERSION
• With TTL, makes it easy to configure a slave that
contains only the last few days of data.
20
©2014 Cloudera, Inc. All rights reserved.
Third Lesson Learned
• It’s easy to DDOS yourself.
• Replication was using the normal handlers...
• ... and using them to write back!
21
Handler1: Put
Handler2: Delete
Handler3: Replicate
Handler4: Get
Handler5: Put
Replicated Put goes in the queue
©2014 Cloudera, Inc. All rights reserved.
Fourth Lesson Learned
• Instinctively, what would something called
stop_replication do?
22
©2014 Cloudera, Inc. All rights reserved.
Fourth Lesson Learned
• Instinctively, what would something called
stop_replication do?
• Good intentions, bad outcomes, HBASE-8861
22
start/stop_replication
X
©2014 Cloudera, Inc. All rights reserved.
Third Release - 0.96.0 / 0.98.0
• Replication enabled by default!
• Completely refactored for readability/
extensibility (Chris Trezzo)
• ReplicationSyncUp tool (HBASE-9047)
• Throttling (HBASE-9501)
• Finer grained replication controls
(HBASE-8751)
23
©2014 Cloudera, Inc. All rights reserved.
ReplicationSyncUp Tool
• Works on an offline cluster
• Can finish replicating the queues in ZK
• Useful to finish draining a master cluster
24
HBase
HDFS
ZooKeeper
HBase
HDFS
ZooKeeper
ReplicationSyncUp
©2014 Cloudera, Inc. All rights reserved.
Finer Grained Replication Controls
> set_peer_tableCFs '2', "table1;
table2:cf1,cf2; table3:cfA,cfB"
• Meaning: enable replication to peer #2 for:
• All of table1
• cf1 and cf2 from table2
• cfA and cfB from table3
25
©2014 Cloudera, Inc. All rights reserved.
26
Agenda
• Four Years of Replication
• Use Cases in Production
• Roadmap
©2014 Cloudera, Inc. All rights reserved.
Flurry
• Two data centers, coast to coast
• Three clusters, in master-master pairs
• 1200 nodes
• 800 nodes
• 30 nodes
• Replication traffic: 2Gbps
• Latency between DCs: 85ms
27
©2014 Cloudera, Inc. All rights reserved.
Opower
• Two clusters, same data center
• Master: tens of nodes
• Slave: tens of nodes
• Replication traffic: 1GB/day
• Bulk load replication traffic: 180GB/day
• Recent use case
28
©2014 Cloudera, Inc. All rights reserved.
Lily HBase Indexer
• Collaboration between NGData & Cloudera.
• NGData are the creators of the Lily data
management platform.
• Lily HBase Indexer
• Service which acts as a HBase replication listener.
• Custom sink writes to SolrCloud.
• Integrates Cloudera Morphlines library for ETL of
rows.
29
©2014 Cloudera, Inc. All rights reserved.
30
Agenda
• Four Years of Replication
• Use Cases in Production
• Roadmap
©2014 Cloudera, Inc. All rights reserved.
Stop Relying on Permanent Znodes
• Current rule is to never rely on znodes to
survive cluster restarts, upgrades, etc.
• State data should be kept in an HBase table.
• Notification done through a new mechanism
• See: https://issues.apache.org/jira/browse/
HBASE-10295
31
©2014 Cloudera, Inc. All rights reserved.
Define a Replication Interface
• Replication is somewhat extendable but it
lacks stable interfaces.
• The HBase Indexer is such an extension and it
required surgery every time a committer
sneezed.
• See: https://issues.apache.org/jira/browse/
HBASE-10504
32
©2014 Cloudera, Inc. All rights reserved.
Distributed Counters
• Incrementing consists of:
33
©2014 Cloudera, Inc. All rights reserved.
Distributed Counters
• Incrementing consists of:
1.Taking a lock;
33
©2014 Cloudera, Inc. All rights reserved.
Distributed Counters
• Incrementing consists of:
1.Taking a lock;
2.Get’ing the current value; and
33
©2014 Cloudera, Inc. All rights reserved.
Distributed Counters
• Incrementing consists of:
1.Taking a lock;
2.Get’ing the current value; and
3.Put’ing the newly incremented value.
33
©2014 Cloudera, Inc. All rights reserved.
Distributed Counters
• Incrementing consists of:
1.Taking a lock;
2.Get’ing the current value; and
3.Put’ing the newly incremented value.
• This breaks in Master-Master because the
Puts are overwriting each other.
33
©2014 Cloudera, Inc. All rights reserved.
Distributed Counters
• Incrementing consists of:
1.Taking a lock;
2.Get’ing the current value; and
3.Put’ing the newly incremented value.
• This breaks in Master-Master because the
Puts are overwriting each other.
• See https://issues.apache.org/jira/browse/
HBASE-2804
33
©2014 Cloudera, Inc. All rights reserved.
More Tooling
• Replication management console, one shell to
rule all the clusters!
• Replication bootstrapping tool.
• Tool that can move queues between region
servers.
• Tool that can throttle replication on a live
cluster.
34
©2014 Cloudera, Inc. All rights reserved.
Questions?
• Or ping me async:
• @jdcryans
• jdcryans@cloudera.com
• jdcryans on #hbase irc.freenode.net
35
1 of 68

Recommended

HBaseCon 2013: Apache HBase Table Snapshots by
HBaseCon 2013: Apache HBase Table SnapshotsHBaseCon 2013: Apache HBase Table Snapshots
HBaseCon 2013: Apache HBase Table SnapshotsCloudera, Inc.
11.8K views61 slides
Extending Apache Ranger Authorization Beyond Hadoop: Review of Apache Ranger ... by
Extending Apache Ranger Authorization Beyond Hadoop: Review of Apache Ranger ...Extending Apache Ranger Authorization Beyond Hadoop: Review of Apache Ranger ...
Extending Apache Ranger Authorization Beyond Hadoop: Review of Apache Ranger ...DataWorks Summit
1.4K views19 slides
Hadoop Meetup Jan 2019 - Router-Based Federation and Storage Tiering by
Hadoop Meetup Jan 2019 - Router-Based Federation and Storage TieringHadoop Meetup Jan 2019 - Router-Based Federation and Storage Tiering
Hadoop Meetup Jan 2019 - Router-Based Federation and Storage TieringErik Krogen
516 views25 slides
HBase in Practice by
HBase in Practice HBase in Practice
HBase in Practice DataWorks Summit/Hadoop Summit
5.4K views46 slides
Manage Add-On Services with Apache Ambari by
Manage Add-On Services with Apache AmbariManage Add-On Services with Apache Ambari
Manage Add-On Services with Apache AmbariDataWorks Summit
2.2K views45 slides
Ozone: scaling HDFS to trillions of objects by
Ozone: scaling HDFS to trillions of objectsOzone: scaling HDFS to trillions of objects
Ozone: scaling HDFS to trillions of objectsDataWorks Summit
1.7K views41 slides

More Related Content

What's hot

From oracle to hadoop with Sqoop and other tools by
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsGuy Harrison
19.1K views34 slides
Facebook Messages & HBase by
Facebook Messages & HBaseFacebook Messages & HBase
Facebook Messages & HBase强 王
39.2K views39 slides
OLTP+OLAP=HTAP by
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAPEDB
409 views39 slides
[211] HBase 기반 검색 데이터 저장소 (공개용) by
[211] HBase 기반 검색 데이터 저장소 (공개용)[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)NAVER D2
8.5K views73 slides
MariaDB MaxScale by
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScaleMariaDB plc
1.9K views41 slides
Cloudera Impala Internals by
Cloudera Impala InternalsCloudera Impala Internals
Cloudera Impala InternalsDavid Groozman
4.4K views52 slides

What's hot(20)

From oracle to hadoop with Sqoop and other tools by Guy Harrison
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other tools
Guy Harrison19.1K views
Facebook Messages & HBase by 强 王
Facebook Messages & HBaseFacebook Messages & HBase
Facebook Messages & HBase
强 王39.2K views
OLTP+OLAP=HTAP by EDB
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAP
EDB409 views
[211] HBase 기반 검색 데이터 저장소 (공개용) by NAVER D2
[211] HBase 기반 검색 데이터 저장소 (공개용)[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)
NAVER D28.5K views
MariaDB MaxScale by MariaDB plc
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
MariaDB plc1.9K views
Cloudera Impala Internals by David Groozman
Cloudera Impala InternalsCloudera Impala Internals
Cloudera Impala Internals
David Groozman4.4K views
Best practices for MySQL High Availability by Colin Charles
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High Availability
Colin Charles23.5K views
Spark shuffle introduction by colorant
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introduction
colorant50.6K views
How to Manage Scale-Out Environments with MariaDB MaxScale by MariaDB plc
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
MariaDB plc1.2K views
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud by Noritaka Sekiyama
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Noritaka Sekiyama33.3K views
Cours Big Data Chap6 by Amal Abid
Cours Big Data Chap6Cours Big Data Chap6
Cours Big Data Chap6
Amal Abid2.3K views
Hive+Tez: A performance deep dive by t3rmin4t0r
Hive+Tez: A performance deep diveHive+Tez: A performance deep dive
Hive+Tez: A performance deep dive
t3rmin4t0r9.6K views
Apache Tez: Accelerating Hadoop Query Processing by DataWorks Summit
Apache Tez: Accelerating Hadoop Query Processing Apache Tez: Accelerating Hadoop Query Processing
Apache Tez: Accelerating Hadoop Query Processing
DataWorks Summit31.7K views
MySQL HA with PaceMaker by Kris Buytaert
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMaker
Kris Buytaert15.6K views
HBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBase by Cloudera, Inc.
HBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBaseHBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBase
HBaseCon 2013: Apache HBase and HDFS - Understanding Filesystem Usage in HBase
Cloudera, Inc.11K views
Upgrade from MySQL 5.7 to MySQL 8.0 by Olivier DASINI
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
Olivier DASINI2.3K views
Backup and Disaster Recovery in Hadoop by larsgeorge
Backup and Disaster Recovery in HadoopBackup and Disaster Recovery in Hadoop
Backup and Disaster Recovery in Hadoop
larsgeorge6.5K views
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) by Mydbops
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Mydbops2.5K views

Similar to The State of HBase Replication

Tales from the Cloudera Field by
Tales from the Cloudera FieldTales from the Cloudera Field
Tales from the Cloudera FieldHBaseCon
4K views38 slides
Hadoop Operations for Production Systems (Strata NYC) by
Hadoop Operations for Production Systems (Strata NYC)Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)Kathleen Ting
1.1K views173 slides
UKOUG2018 - I Know what you did Last Summer [in my Database].pptx by
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxUKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxMarco Gralike
8 views36 slides
What's New and Upcoming in HDFS - the Hadoop Distributed File System by
What's New and Upcoming in HDFS - the Hadoop Distributed File SystemWhat's New and Upcoming in HDFS - the Hadoop Distributed File System
What's New and Upcoming in HDFS - the Hadoop Distributed File SystemCloudera, Inc.
7.1K views49 slides
Hadoop Operations by
Hadoop OperationsHadoop Operations
Hadoop OperationsCloudera, Inc.
3.7K views132 slides
Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2 by
Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2
Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2Cloudera, Inc.
3.8K views44 slides

Similar to The State of HBase Replication(20)

Tales from the Cloudera Field by HBaseCon
Tales from the Cloudera FieldTales from the Cloudera Field
Tales from the Cloudera Field
HBaseCon4K views
Hadoop Operations for Production Systems (Strata NYC) by Kathleen Ting
Hadoop Operations for Production Systems (Strata NYC)Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)
Kathleen Ting1.1K views
UKOUG2018 - I Know what you did Last Summer [in my Database].pptx by Marco Gralike
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxUKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
Marco Gralike8 views
What's New and Upcoming in HDFS - the Hadoop Distributed File System by Cloudera, Inc.
What's New and Upcoming in HDFS - the Hadoop Distributed File SystemWhat's New and Upcoming in HDFS - the Hadoop Distributed File System
What's New and Upcoming in HDFS - the Hadoop Distributed File System
Cloudera, Inc.7.1K views
Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2 by Cloudera, Inc.
Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2
Strata + Hadoop World 2012: High Availability for the HDFS NameNode Phase 2
Cloudera, Inc.3.8K views
Hive on spark berlin buzzwords by Szehon Ho
Hive on spark berlin buzzwordsHive on spark berlin buzzwords
Hive on spark berlin buzzwords
Szehon Ho652 views
HBaseCon 2015: HBase and Spark by HBaseCon
HBaseCon 2015: HBase and SparkHBaseCon 2015: HBase and Spark
HBaseCon 2015: HBase and Spark
HBaseCon8.7K views
Hadoop 3 (2017 hadoop taiwan workshop) by Wei-Chiu Chuang
Hadoop 3 (2017 hadoop taiwan workshop)Hadoop 3 (2017 hadoop taiwan workshop)
Hadoop 3 (2017 hadoop taiwan workshop)
Wei-Chiu Chuang551 views
Kudu: New Hadoop Storage for Fast Analytics on Fast Data by Cloudera, Inc.
Kudu: New Hadoop Storage for Fast Analytics on Fast DataKudu: New Hadoop Storage for Fast Analytics on Fast Data
Kudu: New Hadoop Storage for Fast Analytics on Fast Data
Cloudera, Inc.10.1K views
HBase replication by wchevreuil
HBase replicationHBase replication
HBase replication
wchevreuil248 views
February 2016 HUG: Apache Kudu (incubating): New Apache Hadoop Storage for Fa... by Yahoo Developer Network
February 2016 HUG: Apache Kudu (incubating): New Apache Hadoop Storage for Fa...February 2016 HUG: Apache Kudu (incubating): New Apache Hadoop Storage for Fa...
February 2016 HUG: Apache Kudu (incubating): New Apache Hadoop Storage for Fa...
Multi-tenant, Multi-cluster and Multi-container Apache HBase Deployments by DataWorks Summit
Multi-tenant, Multi-cluster and Multi-container Apache HBase DeploymentsMulti-tenant, Multi-cluster and Multi-container Apache HBase Deployments
Multi-tenant, Multi-cluster and Multi-container Apache HBase Deployments
DataWorks Summit8.2K views
Big Data in Container; Hadoop Spark in Docker and Mesos by Heiko Loewe
Big Data in Container; Hadoop Spark in Docker and MesosBig Data in Container; Hadoop Spark in Docker and Mesos
Big Data in Container; Hadoop Spark in Docker and Mesos
Heiko Loewe1.8K views
Migrating your clusters and workloads from Hadoop 2 to Hadoop 3 by DataWorks Summit
Migrating your clusters and workloads from Hadoop 2 to Hadoop 3Migrating your clusters and workloads from Hadoop 2 to Hadoop 3
Migrating your clusters and workloads from Hadoop 2 to Hadoop 3
DataWorks Summit7.6K views
Kudu: Resolving Transactional and Analytic Trade-offs in Hadoop by jdcryans
Kudu: Resolving Transactional and Analytic Trade-offs in HadoopKudu: Resolving Transactional and Analytic Trade-offs in Hadoop
Kudu: Resolving Transactional and Analytic Trade-offs in Hadoop
jdcryans987 views

More from HBaseCon

hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes by
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kuberneteshbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
hbaseconasia2017: Building online HBase cluster of Zhihu based on KubernetesHBaseCon
3.9K views36 slides
hbaseconasia2017: HBase on Beam by
hbaseconasia2017: HBase on Beamhbaseconasia2017: HBase on Beam
hbaseconasia2017: HBase on BeamHBaseCon
1.3K views26 slides
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei by
hbaseconasia2017: HBase Disaster Recovery Solution at Huaweihbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: HBase Disaster Recovery Solution at HuaweiHBaseCon
1.4K views21 slides
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest by
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinteresthbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
hbaseconasia2017: Removable singularity: a story of HBase upgrade in PinterestHBaseCon
936 views42 slides
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程 by
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程HBaseCon
1.1K views21 slides
hbaseconasia2017: Apache HBase at Netease by
hbaseconasia2017: Apache HBase at Neteasehbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: Apache HBase at NeteaseHBaseCon
754 views27 slides

More from HBaseCon(20)

hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes by HBaseCon
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kuberneteshbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
HBaseCon3.9K views
hbaseconasia2017: HBase on Beam by HBaseCon
hbaseconasia2017: HBase on Beamhbaseconasia2017: HBase on Beam
hbaseconasia2017: HBase on Beam
HBaseCon1.3K views
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei by HBaseCon
hbaseconasia2017: HBase Disaster Recovery Solution at Huaweihbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
HBaseCon1.4K views
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest by HBaseCon
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinteresthbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon936 views
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程 by HBaseCon
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
HBaseCon1.1K views
hbaseconasia2017: Apache HBase at Netease by HBaseCon
hbaseconasia2017: Apache HBase at Neteasehbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: Apache HBase at Netease
HBaseCon754 views
hbaseconasia2017: HBase在Hulu的使用和实践 by HBaseCon
hbaseconasia2017: HBase在Hulu的使用和实践hbaseconasia2017: HBase在Hulu的使用和实践
hbaseconasia2017: HBase在Hulu的使用和实践
HBaseCon878 views
hbaseconasia2017: 基于HBase的企业级大数据平台 by HBaseCon
hbaseconasia2017: 基于HBase的企业级大数据平台hbaseconasia2017: 基于HBase的企业级大数据平台
hbaseconasia2017: 基于HBase的企业级大数据平台
HBaseCon701 views
hbaseconasia2017: HBase at JD.com by HBaseCon
hbaseconasia2017: HBase at JD.comhbaseconasia2017: HBase at JD.com
hbaseconasia2017: HBase at JD.com
HBaseCon828 views
hbaseconasia2017: Large scale data near-line loading method and architecture by HBaseCon
hbaseconasia2017: Large scale data near-line loading method and architecturehbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
HBaseCon598 views
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei by HBaseCon
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huaweihbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
HBaseCon683 views
hbaseconasia2017: HBase Practice At XiaoMi by HBaseCon
hbaseconasia2017: HBase Practice At XiaoMihbaseconasia2017: HBase Practice At XiaoMi
hbaseconasia2017: HBase Practice At XiaoMi
HBaseCon1.8K views
hbaseconasia2017: hbase-2.0.0 by HBaseCon
hbaseconasia2017: hbase-2.0.0hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0
HBaseCon1.8K views
HBaseCon2017 Democratizing HBase by HBaseCon
HBaseCon2017 Democratizing HBaseHBaseCon2017 Democratizing HBase
HBaseCon2017 Democratizing HBase
HBaseCon897 views
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest by HBaseCon
HBaseCon2017 Removable singularity: a story of HBase upgrade in PinterestHBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon646 views
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase by HBaseCon
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBaseHBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon608 views
HBaseCon2017 Transactions in HBase by HBaseCon
HBaseCon2017 Transactions in HBaseHBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBase
HBaseCon1.8K views
HBaseCon2017 Highly-Available HBase by HBaseCon
HBaseCon2017 Highly-Available HBaseHBaseCon2017 Highly-Available HBase
HBaseCon2017 Highly-Available HBase
HBaseCon1.1K views
HBaseCon2017 Apache HBase at Didi by HBaseCon
HBaseCon2017 Apache HBase at DidiHBaseCon2017 Apache HBase at Didi
HBaseCon2017 Apache HBase at Didi
HBaseCon996 views
HBaseCon2017 gohbase: Pure Go HBase Client by HBaseCon
HBaseCon2017 gohbase: Pure Go HBase ClientHBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon1.7K views

Recently uploaded

Introduction to Maven by
Introduction to MavenIntroduction to Maven
Introduction to MavenJohn Valentino
6 views10 slides
Advanced API Mocking Techniques by
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking TechniquesDimpy Adhikary
23 views11 slides
ShortStory_qlora.pptx by
ShortStory_qlora.pptxShortStory_qlora.pptx
ShortStory_qlora.pptxpranathikrishna22
5 views10 slides
The Path to DevOps by
The Path to DevOpsThe Path to DevOps
The Path to DevOpsJohn Valentino
5 views6 slides
AI and Ml presentation .pptx by
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptxFayazAli87
12 views15 slides
Ports-and-Adapters Architecture for Embedded HMI by
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMIBurkhard Stubert
21 views19 slides

Recently uploaded(20)

Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary23 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8712 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert21 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... by NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi215 views
predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app7 views
tecnologia18.docx by nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67025 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok11 views
Introduction to Git Source Control by John Valentino
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source Control
John Valentino5 views
FIMA 2023 Neo4j & FS - Entity Resolution.pptx by Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j12 views
Sprint 226 by ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ8 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm15 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app8 views
JioEngage_Presentation.pptx by admin125455
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptx
admin1254556 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 views
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta6 views

The State of HBase Replication

  • 1. 1 The State of HBase Replication Jean-Daniel Cryans May 5th, 2014
  • 2. ©2014 Cloudera, Inc. All rights reserved. About me 2 • Software Engineer at Cloudera, Storage team • Apache HBase committer since 2008, PMC member
  • 3. ©2014 Cloudera, Inc. All rights reserved. Motivation for HBase Replication • Even though HBase is: 3
  • 4. ©2014 Cloudera, Inc. All rights reserved. Motivation for HBase Replication • Even though HBase is: • distributed; 3
  • 5. ©2014 Cloudera, Inc. All rights reserved. Motivation for HBase Replication • Even though HBase is: • distributed; • fault-tolerant; 3
  • 6. ©2014 Cloudera, Inc. All rights reserved. Motivation for HBase Replication • Even though HBase is: • distributed; • fault-tolerant; • highly available; and 3
  • 7. ©2014 Cloudera, Inc. All rights reserved. Motivation for HBase Replication • Even though HBase is: • distributed; • fault-tolerant; • highly available; and • almost magic. 3
  • 8. ©2014 Cloudera, Inc. All rights reserved. Motivation for HBase Replication • Even though HBase is: • distributed; • fault-tolerant; • highly available; and • almost magic. 3
  • 9. ©2014 Cloudera, Inc. All rights reserved. The Current State • It’s production-ready. 4
  • 10. ©2014 Cloudera, Inc. All rights reserved. The Current State • It’s production-ready. • It’s used to replicate data between thousands of nodes across continents. 4
  • 11. ©2014 Cloudera, Inc. All rights reserved. The Current State • It’s production-ready. • It’s used to replicate data between thousands of nodes across continents. • It’s used for Disaster Recovery, geo- distributed serving, and more. 4
  • 12. ©2014 Cloudera, Inc. All rights reserved. 5 Agenda • Four Years of Replication • Use Cases in Production • Roadmap
  • 13. ©2014 Cloudera, Inc. All rights reserved. Design • Clusters are distinct • Pull VS push • Sync VS Async 6
  • 14. ©2014 Cloudera, Inc. All rights reserved. Clusters are Distinct • HBase doesn’t span DCs, HDFSs 7 Master 20 RS Slave 15 RS
  • 15. ©2014 Cloudera, Inc. All rights reserved. Clusters are Distinct • HBase doesn’t span DCs, HDFSs • .META. operations aren’t replicated 7 Master 20 RS Slave 15 RS
  • 16. ©2014 Cloudera, Inc. All rights reserved. Clusters are Distinct • HBase doesn’t span DCs, HDFSs • .META. operations aren’t replicated • Regions can be different 7 Master 20 RS Slave 15 RS
  • 17. ©2014 Cloudera, Inc. All rights reserved. Clusters are Distinct • HBase doesn’t span DCs, HDFSs • .META. operations aren’t replicated • Regions can be different • Security has to be configured for each cluster 7 Master 20 RS Slave 15 RS
  • 18. ©2014 Cloudera, Inc. All rights reserved. Push instead of Pull 8 MySQL Master MySQL Slave Get binlog Apply locally MySQL Replication uses Pull Cluster A Cluster B
  • 19. ©2014 Cloudera, Inc. All rights reserved. Push instead of Pull 9 RS RSreplicate entries Apply to cluster HBase Replication uses Push Cluster A Cluster B
  • 20. ©2014 Cloudera, Inc. All rights reserved. Async instead of Sync 10 Cluster A Cluster B RS HLog MemStore RS HLog MemStore Synchronous Replication
  • 21. ©2014 Cloudera, Inc. All rights reserved. Async instead of Sync 10 Cluster A Cluster B RS HLog MemStore RS HLog MemStore Put 2 3 1 Synchronous Replication
  • 22. ©2014 Cloudera, Inc. All rights reserved. Async instead of Sync 10 Cluster A Cluster B RS HLog MemStore RS HLog MemStore Put 2 3 1 Ack Ack Put 5 6 4 78 Synchronous Replication
  • 23. ©2014 Cloudera, Inc. All rights reserved. Async instead of Sync 11 Asynchronous Replication
  • 24. ©2014 Cloudera, Inc. All rights reserved. Async instead of Sync 11 Asynchronous Replication Cluster A RS HLog MemStore Put Ack 2 3 1 4
  • 25. ©2014 Cloudera, Inc. All rights reserved. Async instead of Sync 11 Asynchronous Replication Cluster A RS HLog MemStore Put Ack 2 3 1 4 Cluster B RS HLog MemStore Ack Put 3 4 2 5 HLog Tailing Thread 1
  • 26. ©2014 Cloudera, Inc. All rights reserved. First Release - 0.90.0 • Simple master-slave (only one) • Disabled by default • Uses ZK as a metadata store 12
  • 27. ©2014 Cloudera, Inc. All rights reserved. Original Implementation 13 replicateLogEntries()Replication Source ZooKeeper Watcher Region Server on Master Cluster Replication Sink HTable Put Delete Region Server on Slave Cluster
  • 28. ©2014 Cloudera, Inc. All rights reserved. First Lesson Learned • HDFS doesn’t support tailing files being written to. It requires: • open() • seek()// go where we stopped last time • while (not EOF || enoughData) • read() • close() • repeat 14
  • 29. ©2014 Cloudera, Inc. All rights reserved. Second Lesson Learned • Single threaded, non-batched ZK is slow • ZK didn’t have an atomic move operation • Doubles # ops needed, race conditions 15
  • 30. ©2014 Cloudera, Inc. All rights reserved. Second Lesson Learned • Single threaded, non-batched ZK is slow • ZK didn’t have an atomic move operation • Doubles # ops needed, race conditions 15 /hbase /replication /RS1 /1 /hlog1 /hlog2 ... /hbase /replication /RS2 /1-RS1 /hlog1 1. create new hlog2 2. delete old hlog2
  • 31. ©2014 Cloudera, Inc. All rights reserved. Second Release - 0.92.0 • Cyclic replication • Multi-slave (scope LOCAL or GLOBAL) • Enable / disable peer • Special configurations 16
  • 32. ©2014 Cloudera, Inc. All rights reserved. Cyclic Replication 17 Cluster 1 Cluster 2 Cluster 3 Put Row X
  • 33. ©2014 Cloudera, Inc. All rights reserved. Cyclic Replication 17 Cluster 1 Cluster 2 Cluster 3 Put Row X Put Row X
  • 34. ©2014 Cloudera, Inc. All rights reserved. Cyclic Replication 17 Cluster 1 Cluster 2 Cluster 3 Put Row X Put Row X Put Row X
  • 35. ©2014 Cloudera, Inc. All rights reserved. Cyclic Replication 17 Cluster 1 Cluster 2 Cluster 3 Put Row X Put Row X Put Row X Row X is from 1 Don’t replicate!
  • 36. ©2014 Cloudera, Inc. All rights reserved. Multi-Slave 18 Cluster 1 Cluster 2 Cluster 3 Put Row X
  • 37. ©2014 Cloudera, Inc. All rights reserved. Multi-Slave 18 Cluster 1 Cluster 2 Cluster 3 Put Row X Put Row X
  • 38. ©2014 Cloudera, Inc. All rights reserved. Multi-Slave 18 Cluster 1 Cluster 2 Cluster 3 Put Row X Put Row X Put Row X
  • 39. ©2014 Cloudera, Inc. All rights reserved. Enable / Disable Peers 19 Cluster 1 RS HLog Cluster 2 RSHLog Tailing Thread
  • 40. ©2014 Cloudera, Inc. All rights reserved. Enable / Disable Peers > disable_peer ‘2’ 19 Cluster 1 RS HLog Cluster 2 RSHLog Tailing Thread Is the peer enabled?
  • 41. ©2014 Cloudera, Inc. All rights reserved. Enable / Disable Peers > disable_peer ‘2’ 19 Cluster 1 RS HLog Cluster 2 RSHLog Tailing Thread HLog Is the peer enabled?
  • 42. ©2014 Cloudera, Inc. All rights reserved. Enable / Disable Peers > disable_peer ‘2’ 19 Cluster 1 RS HLog Cluster 2 RSHLog Tailing Thread HLog HLog Is the peer enabled?
  • 43. ©2014 Cloudera, Inc. All rights reserved. Enable / Disable Peers > disable_peer ‘2’ 19 Cluster 1 RS HLog Cluster 2 RSHLog Tailing Thread HLog HLog HLog Is the peer enabled?
  • 44. ©2014 Cloudera, Inc. All rights reserved. Enable / Disable Peers > disable_peer ‘2’ 19 Cluster 1 RS HLog Cluster 2 RSHLog Tailing Thread HLog HLog HLog HLog Is the peer enabled?
  • 45. ©2014 Cloudera, Inc. All rights reserved. Enable / Disable Peers > disable_peer ‘2’ 19 Cluster 1 RS HLog Cluster 2 RSHLog Tailing Thread HLog HLog HLog HLog HLog Is the peer enabled?
  • 46. ©2014 Cloudera, Inc. All rights reserved. Special Configurations • KEEP_DELETED_CELLS • Must be used on slaves with replication when deleting data. 20
  • 47. ©2014 Cloudera, Inc. All rights reserved. Special Configurations • KEEP_DELETED_CELLS • Must be used on slaves with replication when deleting data. • MIN_VERSION • With TTL, makes it easy to configure a slave that contains only the last few days of data. 20
  • 48. ©2014 Cloudera, Inc. All rights reserved. Third Lesson Learned • It’s easy to DDOS yourself. • Replication was using the normal handlers... • ... and using them to write back! 21 Handler1: Put Handler2: Delete Handler3: Replicate Handler4: Get Handler5: Put Replicated Put goes in the queue
  • 49. ©2014 Cloudera, Inc. All rights reserved. Fourth Lesson Learned • Instinctively, what would something called stop_replication do? 22
  • 50. ©2014 Cloudera, Inc. All rights reserved. Fourth Lesson Learned • Instinctively, what would something called stop_replication do? • Good intentions, bad outcomes, HBASE-8861 22 start/stop_replication X
  • 51. ©2014 Cloudera, Inc. All rights reserved. Third Release - 0.96.0 / 0.98.0 • Replication enabled by default! • Completely refactored for readability/ extensibility (Chris Trezzo) • ReplicationSyncUp tool (HBASE-9047) • Throttling (HBASE-9501) • Finer grained replication controls (HBASE-8751) 23
  • 52. ©2014 Cloudera, Inc. All rights reserved. ReplicationSyncUp Tool • Works on an offline cluster • Can finish replicating the queues in ZK • Useful to finish draining a master cluster 24 HBase HDFS ZooKeeper HBase HDFS ZooKeeper ReplicationSyncUp
  • 53. ©2014 Cloudera, Inc. All rights reserved. Finer Grained Replication Controls > set_peer_tableCFs '2', "table1; table2:cf1,cf2; table3:cfA,cfB" • Meaning: enable replication to peer #2 for: • All of table1 • cf1 and cf2 from table2 • cfA and cfB from table3 25
  • 54. ©2014 Cloudera, Inc. All rights reserved. 26 Agenda • Four Years of Replication • Use Cases in Production • Roadmap
  • 55. ©2014 Cloudera, Inc. All rights reserved. Flurry • Two data centers, coast to coast • Three clusters, in master-master pairs • 1200 nodes • 800 nodes • 30 nodes • Replication traffic: 2Gbps • Latency between DCs: 85ms 27
  • 56. ©2014 Cloudera, Inc. All rights reserved. Opower • Two clusters, same data center • Master: tens of nodes • Slave: tens of nodes • Replication traffic: 1GB/day • Bulk load replication traffic: 180GB/day • Recent use case 28
  • 57. ©2014 Cloudera, Inc. All rights reserved. Lily HBase Indexer • Collaboration between NGData & Cloudera. • NGData are the creators of the Lily data management platform. • Lily HBase Indexer • Service which acts as a HBase replication listener. • Custom sink writes to SolrCloud. • Integrates Cloudera Morphlines library for ETL of rows. 29
  • 58. ©2014 Cloudera, Inc. All rights reserved. 30 Agenda • Four Years of Replication • Use Cases in Production • Roadmap
  • 59. ©2014 Cloudera, Inc. All rights reserved. Stop Relying on Permanent Znodes • Current rule is to never rely on znodes to survive cluster restarts, upgrades, etc. • State data should be kept in an HBase table. • Notification done through a new mechanism • See: https://issues.apache.org/jira/browse/ HBASE-10295 31
  • 60. ©2014 Cloudera, Inc. All rights reserved. Define a Replication Interface • Replication is somewhat extendable but it lacks stable interfaces. • The HBase Indexer is such an extension and it required surgery every time a committer sneezed. • See: https://issues.apache.org/jira/browse/ HBASE-10504 32
  • 61. ©2014 Cloudera, Inc. All rights reserved. Distributed Counters • Incrementing consists of: 33
  • 62. ©2014 Cloudera, Inc. All rights reserved. Distributed Counters • Incrementing consists of: 1.Taking a lock; 33
  • 63. ©2014 Cloudera, Inc. All rights reserved. Distributed Counters • Incrementing consists of: 1.Taking a lock; 2.Get’ing the current value; and 33
  • 64. ©2014 Cloudera, Inc. All rights reserved. Distributed Counters • Incrementing consists of: 1.Taking a lock; 2.Get’ing the current value; and 3.Put’ing the newly incremented value. 33
  • 65. ©2014 Cloudera, Inc. All rights reserved. Distributed Counters • Incrementing consists of: 1.Taking a lock; 2.Get’ing the current value; and 3.Put’ing the newly incremented value. • This breaks in Master-Master because the Puts are overwriting each other. 33
  • 66. ©2014 Cloudera, Inc. All rights reserved. Distributed Counters • Incrementing consists of: 1.Taking a lock; 2.Get’ing the current value; and 3.Put’ing the newly incremented value. • This breaks in Master-Master because the Puts are overwriting each other. • See https://issues.apache.org/jira/browse/ HBASE-2804 33
  • 67. ©2014 Cloudera, Inc. All rights reserved. More Tooling • Replication management console, one shell to rule all the clusters! • Replication bootstrapping tool. • Tool that can move queues between region servers. • Tool that can throttle replication on a live cluster. 34
  • 68. ©2014 Cloudera, Inc. All rights reserved. Questions? • Or ping me async: • @jdcryans • jdcryans@cloudera.com • jdcryans on #hbase irc.freenode.net 35