Facebook's HBase Backups - StampedeCon 2012

Facebook's HBase Backups - StampedeCon 2012
HBASE Backups



Pritam Damania
Software Engineer, Facebook
Aug 1, 2012
Agenda
 1   Introduction to HBASE and HDFS

 2   Introduction to HBASE Backups

 3   Facebook’s Backup solution

 4   Results

 5   Further Work
INTRODUCTION TO HDFS
What is HDFS ?


▪  Distributed   FileSystem
▪  Runs    on top of commodity hardware
▪  Scale   to Petabytes of data
▪  Tolerates   machine failures
HDFS Data Model

▪  Data    is logically organized into files and directories
▪  Files   are divided into uniform-sized blocks
▪  Blocks
        are distributed across the nodes of the cluster and are replicated
 to handle hardware failure
▪  HDFS     keeps checksums of data for corruption detection and recovery
▪  HDFS     exposes block placement so that computation can be migrated to
 data
HDFS Data Model (2)

            MetaInfo(Filename, replicationFactor, block-ids, …)
            /users/user1/data/part-0, repl:2, ids: {1,3}, …
            /users/user1/data/part-1, repl:3, ids: {2,4,5}, …


                                Block Storage

1                           2
                                          1       4         2     5
        2


                                           3                      4
            3         4
    5                                               5



                                                  7
HDFS Architecture
                                               Metadata (Name, #replicas, …):
                          Namenode                 /users/foo/data, 3, …
       Metadata ops
                                             Block ops
  Client               Metadata ops

Read              Datanodes                                 Datanodes
                                       Replication

                                                                     Blocks


                               Write                        Rack 2
            Rack 1
                            Client
                                                     8
INTRODUCTION TO HBASE
HBase in a nutshell

§  distributed, large-scale data store

§  can host very large tables, billions of rows x millions of columns

§  efficient at random reads/writes

§  open source project modeled after Google’s BigTable
HBase Data Model
•  An HBase table is:
 •    a sparse , three-dimensional array of cells, indexed by:
       RowKey, ColumnKey, Timestamp/Version

 •    sharded into regions along an ordered RowKey space

•  Within each region:
 •    Data is grouped into column families
 ▪    Sort order within each column family:

      •  Row Key (asc), Column Key (asc), Timestamp (desc)
HBase System Overview
                            Database Layer
   HBASE
       Master     Backup Master
   Region           Region             Region    ...
   Server           Server             Server

            Storage Layer                              Coordination Service

HDFS                                            Zookeeper Quorum
   Namenode         Secondary Namenode          ZK         ZK         ...
                                                Peer       Peer
Datanode Datanode       Datanode       ...
HBase Overview
HBASE Region Server
             ....
          Region #2
       Region #1
                    ....
                ColumnFamily #2
            ColumnFamily #1         Memstore
                             (in memory data structure)


               HFiles (in HDFS)                       flush



  Write Ahead Log ( in HDFS)
INTRODUCTION TO HBASE
       BACKUPS
Why Backups ?


▪  Data   Corruption
▪  Operational   error
▪  Hardware   failures
▪  Disaster
Hbase Backups – The Problem

▪  Need   a consistent, point in time backup
▪  Issues   :
 ▪    Live cluster, with traffic
 ▪    Data in MemStore
 ▪    Flushes and Compations in the background
 ▪    Regionserver death
 ▪    Regions moving
CURRENT OPTIONS – Export Table
▪  Pros   :
 ▪    Can export part or full table
 ▪    Map-Reduce job downloads data to output path provided
 ▪    Supports start time, end time and versions so could provide a
      consistent backup
 ▪    Can specify which Column Families to export
▪  Cons       :
 ▪    Only one table at a time
 ▪    Full scans and random reads
CURRENT OPTIONS - Copy Table
▪  Tool   to copy existing table to a intra/inter cluster
▪  Pros   :
 ▪    Another parallel replicated setup to switch
 ▪    Supports start time, end time, and versions
 ▪    Cluster being copied to could be in different setup
 ▪    Can specify which Column Families to export
▪  Cons       :
 ▪    Keep another HBASE cluster up and ready
 ▪    Full scans and random reads
Facebook’s Backup Solution
Backups V1
                Log(Put
                A)
  Application             Backup
                          Cluster
                Log(Put
                A)
        Put A             Dedup

    HBase                 Verify
Backups V1 – Pros and Cons
▪  Pros   :
 ▪    Simple solution
 ▪    Consistency in backup
 ▪    Point in time restore
 ▪    Verification of backups
▪  Cons       :
 ▪    Requires replay of large amount of transactions
 ▪    Requires double writes and deduplication
Backups V2

               Flush Region
 RegionServe   Get File List           Mapper
      r


     Flush                     Copy
                               Files


                      HDFS
                                                .regioninfo
Backups V2 – Tuning


▪  Locality   based mappers
▪  Use   in rack replication
▪  Increase   .Trash retention for HDFS
▪  Fault   tolerant
▪  Use   Backups V1 for point in time
Backups V2 – Restore



▪  Rewrite   backed up .regioninfo
▪  Move   backup copy in place
▪  Add   regions to .META using .regioninfo
Backups V2 – Pros and Cons
▪  Pros   :
 ▪    Faster restore
 ▪    Backup entire data in hours
 ▪    Consistency in backup
 ▪    Point in time restore
 ▪    Resilient to RS death, region moves
▪  Cons       :
 ▪    Affects production cluster
 ▪    Not scalable with data growth
Backups V2 – HDFS Improvements


▪  Overhead    of copying large files
▪  Use   locality of data
▪  HDFS    HFiles are immutable
▪  HDFS    blocks are immutable
▪  Hardlinks   at block level!
Fast Copy workflow
           Source                                                       Destination

B1    B2   ………………..                                         B1’   B2’    ……………………
                                                                         ….




FastCopy Client                           Add Block
                                       Create Destination
                                          Get Source              NameNode




                          Copy Block




     B1             B1’                    B1         B1’         B1                  B1’

     B2             B2’                    B2         B2’         B2                  B2’

      Date Node1                             Date Node2                 Date Node3
FastCopy – Pros and Cons

▪  Pros   :
 ▪    Extremely fast
 ▪    Lots of space saving
 ▪    Minimal impact to production cluster
▪  Cons       :
 ▪    NameNode not aware
 ▪    Hardlinks lost on datanode death
 ▪    Balancer not aware.
Operations


▪  Messages    Use Case :
 ▪    3 stage (same cluster, off cluster, off data center)
 ▪    Stage 1 : once/ day
 ▪    Stage 2 : once / 10 day
 ▪    Stage 3 : once / 10 day
 ▪    Retention based on capacity
Results
Backup Numbers

Example :
▪    40 TB table
▪    49 Mappers
▪    Normal Copy – 15 hours
▪    Fast Copy – 1.5 hours
Disk Savings - FastCopy



Disk
usage in
percent
Network Traffic - FastCopy
Further Work
Further Work

▪    Backup HLogs
▪    Point in time backups
▪    Namenode level Hard links


▪    Code and JIRAs :
     ▪    HBASE 4618
     ▪    HDFS code in github (https://github.com/facebook/hadoop-20)
Acknowledgements

▪    Madhuwanti Vaidya

▪    Ryan Thiessen

▪    Karthik Ranganathan

▪    Paul Tuckfield

▪    Kannan Muthukkaruppan

▪    Hairong Kuang

▪    Dhruba Borthakur

▪    Amitanand Aiyer

▪    Mikhail Bautin
Questions ?
(c) 2009 Facebook, Inc. or its licensors. "Facebook" is a registered trademark of Facebook, Inc.. All rights reserved. 1.0
1 of 38

Recommended

HBase @ Twitter by
HBase @ TwitterHBase @ Twitter
HBase @ Twitterctrezzo
7.6K views21 slides
Hadoop Summit 2012 | HBase Consistency and Performance Improvements by
Hadoop Summit 2012 | HBase Consistency and Performance ImprovementsHadoop Summit 2012 | HBase Consistency and Performance Improvements
Hadoop Summit 2012 | HBase Consistency and Performance ImprovementsCloudera, Inc.
4.8K views66 slides
Storage Infrastructure Behind Facebook Messages by
Storage Infrastructure Behind Facebook MessagesStorage Infrastructure Behind Facebook Messages
Storage Infrastructure Behind Facebook Messagesyarapavan
5.8K views32 slides
Facebook keynote-nicolas-qcon by
Facebook keynote-nicolas-qconFacebook keynote-nicolas-qcon
Facebook keynote-nicolas-qconYiwei Ma
640 views39 slides
D02 Evolution of the HADR tool by
D02 Evolution of the HADR toolD02 Evolution of the HADR tool
D02 Evolution of the HADR toolJeyabarathi (JB) Chakrapani
638 views45 slides
Episode 2 DB2 pureScale Installation, Instance Management & Monitoring by
Episode 2 DB2 pureScale Installation, Instance Management & MonitoringEpisode 2 DB2 pureScale Installation, Instance Management & Monitoring
Episode 2 DB2 pureScale Installation, Instance Management & MonitoringLaura Hood
2.6K views26 slides

More Related Content

What's hot

HBase 2.0 cluster topology by
HBase 2.0 cluster topologyHBase 2.0 cluster topology
HBase 2.0 cluster topologyMikhail Antonov
1.8K views12 slides
A DBA’s guide to using TSA by
A DBA’s guide to using TSAA DBA’s guide to using TSA
A DBA’s guide to using TSAFrederik Engelen
7.6K views77 slides
Ibm db2 10.5 for linux, unix, and windows getting started with db2 installa... by
Ibm db2 10.5 for linux, unix, and windows   getting started with db2 installa...Ibm db2 10.5 for linux, unix, and windows   getting started with db2 installa...
Ibm db2 10.5 for linux, unix, and windows getting started with db2 installa...bupbechanhgmail
5.5K views83 slides
A First Look at the DB2 10 DSNZPARM Changes by
A First Look at the DB2 10 DSNZPARM ChangesA First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM ChangesWillie Favero
9.2K views119 slides
Big data- HDFS(2nd presentation) by
Big data- HDFS(2nd presentation)Big data- HDFS(2nd presentation)
Big data- HDFS(2nd presentation)Takrim Ul Islam Laskar
967 views21 slides
Hadoop World 2011: HDFS Federation - Suresh Srinivas, Hortonworks by
Hadoop World 2011: HDFS Federation - Suresh Srinivas, HortonworksHadoop World 2011: HDFS Federation - Suresh Srinivas, Hortonworks
Hadoop World 2011: HDFS Federation - Suresh Srinivas, HortonworksCloudera, Inc.
1.1K views16 slides

What's hot(20)

Ibm db2 10.5 for linux, unix, and windows getting started with db2 installa... by bupbechanhgmail
Ibm db2 10.5 for linux, unix, and windows   getting started with db2 installa...Ibm db2 10.5 for linux, unix, and windows   getting started with db2 installa...
Ibm db2 10.5 for linux, unix, and windows getting started with db2 installa...
bupbechanhgmail5.5K views
A First Look at the DB2 10 DSNZPARM Changes by Willie Favero
A First Look at the DB2 10 DSNZPARM ChangesA First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM Changes
Willie Favero9.2K views
Hadoop World 2011: HDFS Federation - Suresh Srinivas, Hortonworks by Cloudera, Inc.
Hadoop World 2011: HDFS Federation - Suresh Srinivas, HortonworksHadoop World 2011: HDFS Federation - Suresh Srinivas, Hortonworks
Hadoop World 2011: HDFS Federation - Suresh Srinivas, Hortonworks
Cloudera, Inc.1.1K views
DB2 V 10 HADR Multiple Standby by Dale McInnis
DB2 V 10 HADR Multiple StandbyDB2 V 10 HADR Multiple Standby
DB2 V 10 HADR Multiple Standby
Dale McInnis4.2K views
11 cool features in Defrag.nsf+ 11 by aosborne
11 cool features in Defrag.nsf+ 1111 cool features in Defrag.nsf+ 11
11 cool features in Defrag.nsf+ 11
aosborne300 views
Hadoop Distributed File System(HDFS) : Behind the scenes by Nitin Khattar
Hadoop Distributed File System(HDFS) : Behind the scenesHadoop Distributed File System(HDFS) : Behind the scenes
Hadoop Distributed File System(HDFS) : Behind the scenes
Nitin Khattar3.8K views
Hadoop Successes and Failures to Drive Deployment Evolution by Benoit Perroud
Hadoop Successes and Failures to Drive Deployment EvolutionHadoop Successes and Failures to Drive Deployment Evolution
Hadoop Successes and Failures to Drive Deployment Evolution
Benoit Perroud3.1K views
HDFS Futures: NameNode Federation for Improved Efficiency and Scalability by Hortonworks
HDFS Futures: NameNode Federation for Improved Efficiency and ScalabilityHDFS Futures: NameNode Federation for Improved Efficiency and Scalability
HDFS Futures: NameNode Federation for Improved Efficiency and Scalability
Hortonworks3K views
Less is More: 2X Storage Efficiency with HDFS Erasure Coding by Zhe Zhang
Less is More: 2X Storage Efficiency with HDFS Erasure CodingLess is More: 2X Storage Efficiency with HDFS Erasure Coding
Less is More: 2X Storage Efficiency with HDFS Erasure Coding
Zhe Zhang437 views
Hadoop HDFS NameNode HA by Hanborq Inc.
Hadoop HDFS NameNode HAHadoop HDFS NameNode HA
Hadoop HDFS NameNode HA
Hanborq Inc.2.6K views
Introduction to hadoop and hdfs by shrey mehrotra
Introduction to hadoop and hdfsIntroduction to hadoop and hdfs
Introduction to hadoop and hdfs
shrey mehrotra1.6K views
JONSMITH10042016 by Jon Smith
JONSMITH10042016JONSMITH10042016
JONSMITH10042016
Jon Smith201 views

Similar to Facebook's HBase Backups - StampedeCon 2012

支撑Facebook消息处理的h base存储系统 by
支撑Facebook消息处理的h base存储系统支撑Facebook消息处理的h base存储系统
支撑Facebook消息处理的h base存储系统yongboy
846 views39 slides
Facebook Messages & HBase by
Facebook Messages & HBaseFacebook Messages & HBase
Facebook Messages & HBase强 王
39.2K views39 slides
Hadoop 3.0 - Revolution or evolution? by
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Uwe Printz
807 views42 slides
[Hi c2011]building mission critical messaging system(guoqiang jerry) by
[Hi c2011]building mission critical messaging system(guoqiang jerry)[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)baggioss
876 views46 slides
Hadoop 3.0 - Revolution or evolution? by
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Uwe Printz
1.2K views38 slides
Putting Wings on the Elephant by
Putting Wings on the ElephantPutting Wings on the Elephant
Putting Wings on the ElephantDataWorks Summit
1.8K views42 slides

Similar to Facebook's HBase Backups - StampedeCon 2012(20)

支撑Facebook消息处理的h base存储系统 by yongboy
支撑Facebook消息处理的h base存储系统支撑Facebook消息处理的h base存储系统
支撑Facebook消息处理的h base存储系统
yongboy846 views
Facebook Messages & HBase by 强 王
Facebook Messages & HBaseFacebook Messages & HBase
Facebook Messages & HBase
强 王39.2K views
Hadoop 3.0 - Revolution or evolution? by Uwe Printz
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?
Uwe Printz807 views
[Hi c2011]building mission critical messaging system(guoqiang jerry) by baggioss
[Hi c2011]building mission critical messaging system(guoqiang jerry)[Hi c2011]building mission critical messaging system(guoqiang jerry)
[Hi c2011]building mission critical messaging system(guoqiang jerry)
baggioss876 views
Hadoop 3.0 - Revolution or evolution? by Uwe Printz
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?
Uwe Printz1.2K views
Hadoop Backup and Disaster Recovery by Cloudera, Inc.
Hadoop Backup and Disaster RecoveryHadoop Backup and Disaster Recovery
Hadoop Backup and Disaster Recovery
Cloudera, Inc.62.8K views
HBaseConAsia2018 Track1-5: Improving HBase reliability at PInterest with geo ... by Michael Stack
HBaseConAsia2018 Track1-5: Improving HBase reliability at PInterest with geo ...HBaseConAsia2018 Track1-5: Improving HBase reliability at PInterest with geo ...
HBaseConAsia2018 Track1-5: Improving HBase reliability at PInterest with geo ...
Michael Stack1.5K views
Facebook's Approach to Big Data Storage Challenge by DataWorks Summit
Facebook's Approach to Big Data Storage ChallengeFacebook's Approach to Big Data Storage Challenge
Facebook's Approach to Big Data Storage Challenge
DataWorks Summit3.6K views
Facebook - Jonthan Gray - Hadoop World 2010 by Cloudera, Inc.
Facebook - Jonthan Gray - Hadoop World 2010Facebook - Jonthan Gray - Hadoop World 2010
Facebook - Jonthan Gray - Hadoop World 2010
Cloudera, Inc.8.7K views
Migrating from InnoDB and HBase to MyRocks at Facebook by MariaDB plc
Migrating from InnoDB and HBase to MyRocks at FacebookMigrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at Facebook
MariaDB plc44.4K views
MyRocks introduction and production deployment by Yoshinori Matsunobu
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
Yoshinori Matsunobu3.3K views
Hadoop - Disk Fail In Place (DFIP) by mundlapudi
Hadoop - Disk Fail In Place (DFIP)Hadoop - Disk Fail In Place (DFIP)
Hadoop - Disk Fail In Place (DFIP)
mundlapudi3.5K views
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл... by Ontico
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Ontico654 views
CLFS 2010 by bergwolf
CLFS 2010CLFS 2010
CLFS 2010
bergwolf928 views
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia by Yahoo Developer Network
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay RadiaApache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia
Hadoop - Just the Basics for Big Data Rookies (SpringOne2GX 2013) by VMware Tanzu
Hadoop - Just the Basics for Big Data Rookies (SpringOne2GX 2013)Hadoop - Just the Basics for Big Data Rookies (SpringOne2GX 2013)
Hadoop - Just the Basics for Big Data Rookies (SpringOne2GX 2013)
VMware Tanzu4.9K views
Hdfs 2016-hadoop-summit-san-jose-v4 by Chris Nauroth
Hdfs 2016-hadoop-summit-san-jose-v4Hdfs 2016-hadoop-summit-san-jose-v4
Hdfs 2016-hadoop-summit-san-jose-v4
Chris Nauroth1.8K views

More from StampedeCon

Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo... by
Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo...Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo...
Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo...StampedeCon
2.6K views34 slides
The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017 by
The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017
The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017StampedeCon
638 views51 slides
Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017 by
Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017
Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017StampedeCon
397 views19 slides
Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam... by
Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam...Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam...
Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam...StampedeCon
417 views19 slides
How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017 by
How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017
How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017StampedeCon
394 views32 slides
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017 by
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017StampedeCon
1.4K views62 slides

More from StampedeCon(20)

Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo... by StampedeCon
Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo...Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo...
Why Should We Trust You-Interpretability of Deep Neural Networks - StampedeCo...
StampedeCon2.6K views
The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017 by StampedeCon
The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017
The Search for a New Visual Search Beyond Language - StampedeCon AI Summit 2017
StampedeCon638 views
Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017 by StampedeCon
Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017
Predicting Outcomes When Your Outcomes are Graphs - StampedeCon AI Summit 2017
StampedeCon397 views
Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam... by StampedeCon
Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam...Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam...
Novel Semi-supervised Probabilistic ML Approach to SNP Variant Calling - Stam...
StampedeCon417 views
How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017 by StampedeCon
How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017
How to Talk about AI to Non-analaysts - Stampedecon AI Summit 2017
StampedeCon394 views
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017 by StampedeCon
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
StampedeCon1.4K views
Foundations of Machine Learning - StampedeCon AI Summit 2017 by StampedeCon
Foundations of Machine Learning - StampedeCon AI Summit 2017Foundations of Machine Learning - StampedeCon AI Summit 2017
Foundations of Machine Learning - StampedeCon AI Summit 2017
StampedeCon574 views
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem... by StampedeCon
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
StampedeCon392 views
Bringing the Whole Elephant Into View Can Cognitive Systems Bring Real Soluti... by StampedeCon
Bringing the Whole Elephant Into View Can Cognitive Systems Bring Real Soluti...Bringing the Whole Elephant Into View Can Cognitive Systems Bring Real Soluti...
Bringing the Whole Elephant Into View Can Cognitive Systems Bring Real Soluti...
StampedeCon221 views
Automated AI The Next Frontier in Analytics - StampedeCon AI Summit 2017 by StampedeCon
Automated AI The Next Frontier in Analytics - StampedeCon AI Summit 2017Automated AI The Next Frontier in Analytics - StampedeCon AI Summit 2017
Automated AI The Next Frontier in Analytics - StampedeCon AI Summit 2017
StampedeCon574 views
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017 by StampedeCon
AI in the Enterprise: Past,  Present &  Future - StampedeCon AI Summit 2017AI in the Enterprise: Past,  Present &  Future - StampedeCon AI Summit 2017
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017
StampedeCon563 views
A Different Data Science Approach - StampedeCon AI Summit 2017 by StampedeCon
A Different Data Science Approach - StampedeCon AI Summit 2017A Different Data Science Approach - StampedeCon AI Summit 2017
A Different Data Science Approach - StampedeCon AI Summit 2017
StampedeCon278 views
Graph in Customer 360 - StampedeCon Big Data Conference 2017 by StampedeCon
Graph in Customer 360 - StampedeCon Big Data Conference 2017Graph in Customer 360 - StampedeCon Big Data Conference 2017
Graph in Customer 360 - StampedeCon Big Data Conference 2017
StampedeCon1.2K views
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017 by StampedeCon
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
StampedeCon1.8K views
Doing Big Data Using Amazon's Analogs - StampedeCon Big Data Conference 2017 by StampedeCon
Doing Big Data Using Amazon's Analogs - StampedeCon Big Data Conference 2017Doing Big Data Using Amazon's Analogs - StampedeCon Big Data Conference 2017
Doing Big Data Using Amazon's Analogs - StampedeCon Big Data Conference 2017
StampedeCon120 views
Enabling New Business Capabilities with Cloud-based Streaming Data Architectu... by StampedeCon
Enabling New Business Capabilities with Cloud-based Streaming Data Architectu...Enabling New Business Capabilities with Cloud-based Streaming Data Architectu...
Enabling New Business Capabilities with Cloud-based Streaming Data Architectu...
StampedeCon169 views
Big Data Meets IoT: Lessons From the Cloud on Polling, Collecting, and Analyz... by StampedeCon
Big Data Meets IoT: Lessons From the Cloud on Polling, Collecting, and Analyz...Big Data Meets IoT: Lessons From the Cloud on Polling, Collecting, and Analyz...
Big Data Meets IoT: Lessons From the Cloud on Polling, Collecting, and Analyz...
StampedeCon666 views
Innovation in the Data Warehouse - StampedeCon 2016 by StampedeCon
Innovation in the Data Warehouse - StampedeCon 2016Innovation in the Data Warehouse - StampedeCon 2016
Innovation in the Data Warehouse - StampedeCon 2016
StampedeCon914 views
Creating a Data Driven Organization - StampedeCon 2016 by StampedeCon
Creating a Data Driven Organization - StampedeCon 2016Creating a Data Driven Organization - StampedeCon 2016
Creating a Data Driven Organization - StampedeCon 2016
StampedeCon1.1K views
Using The Internet of Things for Population Health Management - StampedeCon 2016 by StampedeCon
Using The Internet of Things for Population Health Management - StampedeCon 2016Using The Internet of Things for Population Health Management - StampedeCon 2016
Using The Internet of Things for Population Health Management - StampedeCon 2016
StampedeCon1.1K views

Recently uploaded

Design Driven Network Assurance by
Design Driven Network AssuranceDesign Driven Network Assurance
Design Driven Network AssuranceNetwork Automation Forum
19 views42 slides
HTTP headers that make your website go faster - devs.gent November 2023 by
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023Thijs Feryn
26 views151 slides
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdfDr. Jimmy Schwarzkopf
24 views29 slides
Evolving the Network Automation Journey from Python to Platforms by
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to PlatformsNetwork Automation Forum
17 views21 slides
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
115 views25 slides
The Forbidden VPN Secrets.pdf by
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdfMariam Shaba
20 views72 slides

Recently uploaded(20)

HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn26 views
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
The Forbidden VPN Secrets.pdf by Mariam Shaba
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdf
Mariam Shaba20 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec15 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software317 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman38 views
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson126 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays17 views

Facebook's HBase Backups - StampedeCon 2012

  • 2. HBASE Backups Pritam Damania Software Engineer, Facebook Aug 1, 2012
  • 3. Agenda 1 Introduction to HBASE and HDFS 2 Introduction to HBASE Backups 3 Facebook’s Backup solution 4 Results 5 Further Work
  • 5. What is HDFS ? ▪  Distributed FileSystem ▪  Runs on top of commodity hardware ▪  Scale to Petabytes of data ▪  Tolerates machine failures
  • 6. HDFS Data Model ▪  Data is logically organized into files and directories ▪  Files are divided into uniform-sized blocks ▪  Blocks are distributed across the nodes of the cluster and are replicated to handle hardware failure ▪  HDFS keeps checksums of data for corruption detection and recovery ▪  HDFS exposes block placement so that computation can be migrated to data
  • 7. HDFS Data Model (2) MetaInfo(Filename, replicationFactor, block-ids, …) /users/user1/data/part-0, repl:2, ids: {1,3}, … /users/user1/data/part-1, repl:3, ids: {2,4,5}, … Block Storage 1 2 1 4 2 5 2 3 4 3 4 5 5 7
  • 8. HDFS Architecture Metadata (Name, #replicas, …): Namenode /users/foo/data, 3, … Metadata ops Block ops Client Metadata ops Read Datanodes Datanodes Replication Blocks Write Rack 2 Rack 1 Client 8
  • 10. HBase in a nutshell §  distributed, large-scale data store §  can host very large tables, billions of rows x millions of columns §  efficient at random reads/writes §  open source project modeled after Google’s BigTable
  • 11. HBase Data Model •  An HBase table is: •  a sparse , three-dimensional array of cells, indexed by: RowKey, ColumnKey, Timestamp/Version •  sharded into regions along an ordered RowKey space •  Within each region: •  Data is grouped into column families ▪  Sort order within each column family: •  Row Key (asc), Column Key (asc), Timestamp (desc)
  • 12. HBase System Overview Database Layer HBASE Master Backup Master Region Region Region ... Server Server Server Storage Layer Coordination Service HDFS Zookeeper Quorum Namenode Secondary Namenode ZK ZK ... Peer Peer Datanode Datanode Datanode ...
  • 13. HBase Overview HBASE Region Server .... Region #2 Region #1 .... ColumnFamily #2 ColumnFamily #1 Memstore (in memory data structure) HFiles (in HDFS) flush Write Ahead Log ( in HDFS)
  • 15. Why Backups ? ▪  Data Corruption ▪  Operational error ▪  Hardware failures ▪  Disaster
  • 16. Hbase Backups – The Problem ▪  Need a consistent, point in time backup ▪  Issues : ▪  Live cluster, with traffic ▪  Data in MemStore ▪  Flushes and Compations in the background ▪  Regionserver death ▪  Regions moving
  • 17. CURRENT OPTIONS – Export Table ▪  Pros : ▪  Can export part or full table ▪  Map-Reduce job downloads data to output path provided ▪  Supports start time, end time and versions so could provide a consistent backup ▪  Can specify which Column Families to export ▪  Cons : ▪  Only one table at a time ▪  Full scans and random reads
  • 18. CURRENT OPTIONS - Copy Table ▪  Tool to copy existing table to a intra/inter cluster ▪  Pros : ▪  Another parallel replicated setup to switch ▪  Supports start time, end time, and versions ▪  Cluster being copied to could be in different setup ▪  Can specify which Column Families to export ▪  Cons : ▪  Keep another HBASE cluster up and ready ▪  Full scans and random reads
  • 20. Backups V1 Log(Put A) Application Backup Cluster Log(Put A) Put A Dedup HBase Verify
  • 21. Backups V1 – Pros and Cons ▪  Pros : ▪  Simple solution ▪  Consistency in backup ▪  Point in time restore ▪  Verification of backups ▪  Cons : ▪  Requires replay of large amount of transactions ▪  Requires double writes and deduplication
  • 22. Backups V2 Flush Region RegionServe Get File List Mapper r Flush Copy Files HDFS .regioninfo
  • 23. Backups V2 – Tuning ▪  Locality based mappers ▪  Use in rack replication ▪  Increase .Trash retention for HDFS ▪  Fault tolerant ▪  Use Backups V1 for point in time
  • 24. Backups V2 – Restore ▪  Rewrite backed up .regioninfo ▪  Move backup copy in place ▪  Add regions to .META using .regioninfo
  • 25. Backups V2 – Pros and Cons ▪  Pros : ▪  Faster restore ▪  Backup entire data in hours ▪  Consistency in backup ▪  Point in time restore ▪  Resilient to RS death, region moves ▪  Cons : ▪  Affects production cluster ▪  Not scalable with data growth
  • 26. Backups V2 – HDFS Improvements ▪  Overhead of copying large files ▪  Use locality of data ▪  HDFS HFiles are immutable ▪  HDFS blocks are immutable ▪  Hardlinks at block level!
  • 27. Fast Copy workflow Source Destination B1 B2 ……………….. B1’ B2’ …………………… …. FastCopy Client Add Block Create Destination Get Source NameNode Copy Block B1 B1’ B1 B1’ B1 B1’ B2 B2’ B2 B2’ B2 B2’ Date Node1 Date Node2 Date Node3
  • 28. FastCopy – Pros and Cons ▪  Pros : ▪  Extremely fast ▪  Lots of space saving ▪  Minimal impact to production cluster ▪  Cons : ▪  NameNode not aware ▪  Hardlinks lost on datanode death ▪  Balancer not aware.
  • 29. Operations ▪  Messages Use Case : ▪  3 stage (same cluster, off cluster, off data center) ▪  Stage 1 : once/ day ▪  Stage 2 : once / 10 day ▪  Stage 3 : once / 10 day ▪  Retention based on capacity
  • 31. Backup Numbers Example : ▪  40 TB table ▪  49 Mappers ▪  Normal Copy – 15 hours ▪  Fast Copy – 1.5 hours
  • 32. Disk Savings - FastCopy Disk usage in percent
  • 33. Network Traffic - FastCopy
  • 35. Further Work ▪  Backup HLogs ▪  Point in time backups ▪  Namenode level Hard links ▪  Code and JIRAs : ▪  HBASE 4618 ▪  HDFS code in github (https://github.com/facebook/hadoop-20)
  • 36. Acknowledgements ▪  Madhuwanti Vaidya ▪  Ryan Thiessen ▪  Karthik Ranganathan ▪  Paul Tuckfield ▪  Kannan Muthukkaruppan ▪  Hairong Kuang ▪  Dhruba Borthakur ▪  Amitanand Aiyer ▪  Mikhail Bautin
  • 38. (c) 2009 Facebook, Inc. or its licensors. "Facebook" is a registered trademark of Facebook, Inc.. All rights reserved. 1.0