Ghislain Fourny. Big Data 5. Column stores

Similar documents
Ghislain Fourny. Big Data 5. Wide column stores

HBASE INTERVIEW QUESTIONS

COSC 6339 Big Data Analytics. NoSQL (II) HBase. Edgar Gabriel Fall HBase. Column-Oriented data store Distributed designed to serve large tables

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2016)

10 Million Smart Meter Data with Apache HBase

ADVANCED HBASE. Architecture and Schema Design GeeCON, May Lars George Director EMEA Services

Comparing SQL and NOSQL databases

HBase. Леонид Налчаджи

Fattane Zarrinkalam کارگاه ساالنه آزمایشگاه فناوری وب

Data Informatics. Seon Ho Kim, Ph.D.

Big Data Analytics. Rasoul Karimi

Typical size of data you deal with on a daily basis

BigTable: A Distributed Storage System for Structured Data

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2017)

HBase... And Lewis Carroll! Twi:er,

Bigtable: A Distributed Storage System for Structured Data By Fay Chang, et al. OSDI Presented by Xiang Gao

Introduction to BigData, Hadoop:-

NoSQL Databases. Amir H. Payberah. Swedish Institute of Computer Science. April 10, 2014

Facebook. The Technology Behind Messages (and more ) Kannan Muthukkaruppan Software Engineer, Facebook. March 11, 2011

CS November 2017

Accelerating Big Data: Using SanDisk SSDs for Apache HBase Workloads

W b b 2.0. = = Data Ex E pl p o l s o io i n

CS November 2018

Google File System and BigTable. and tiny bits of HDFS (Hadoop File System) and Chubby. Not in textbook; additional information

Goal of the presentation is to give an introduction of NoSQL databases, why they are there.

BigTable. Chubby. BigTable. Chubby. Why Chubby? How to do consensus as a service

Ghislain Fourny. Big Data 6. Massive Parallel Processing (MapReduce)

Replica Parallelism to Utilize the Granularity of Data

Ghislain Fourny. Big Data Fall Massive Parallel Processing (MapReduce)

Extreme Computing. NoSQL.

April Final Quiz COSC MapReduce Programming a) Explain briefly the main ideas and components of the MapReduce programming model.

Pyro: A Spatial-Temporal Big-Data Storage System. Shen Li Shaohan Hu Raghu Ganti Mudhakar Srivatsa Tarek Abdelzaher

HBase: Overview. HBase is a distributed column-oriented data store built on top of HDFS

BigTable. CSE-291 (Cloud Computing) Fall 2016

ΕΠΛ 602:Foundations of Internet Technologies. Cloud Computing

Big Data Hadoop Course Content

Big Data Processing Technologies. Chentao Wu Associate Professor Dept. of Computer Science and Engineering

CISC 7610 Lecture 2b The beginnings of NoSQL

CSE 444: Database Internals. Lectures 26 NoSQL: Extensible Record Stores

Scaling Up HBase. Duen Horng (Polo) Chau Assistant Professor Associate Director, MS Analytics Georgia Tech. CSE6242 / CX4242: Data & Visual Analytics

HBase Solutions at Facebook

CSE-E5430 Scalable Cloud Computing Lecture 9

What is database? Types and Examples

Distributed File Systems II

Introduction to Hadoop. High Availability Scaling Advantages and Challenges. Introduction to Big Data

Database Evolution. DB NoSQL Linked Open Data. L. Vigliano

18-hdfs-gfs.txt Thu Oct 27 10:05: Notes on Parallel File Systems: HDFS & GFS , Fall 2011 Carnegie Mellon University Randal E.

Bigtable. A Distributed Storage System for Structured Data. Presenter: Yunming Zhang Conglong Li. Saturday, September 21, 13

BIG DATA TECHNOLOGIES: WHAT EVERY MANAGER NEEDS TO KNOW ANALYTICS AND FINANCIAL INNOVATION CONFERENCE JUNE 26-29,

YCSB++ benchmarking tool Performance debugging advanced features of scalable table stores

Cloudera Kudu Introduction

Using space-filling curves for multidimensional

arxiv: v1 [cs.db] 8 Jan 2016

Advanced HBase Schema Design. Berlin Buzzwords, June 2012 Lars George

Intro Cassandra. Adelaide Big Data Meetup.

big picture parallel db (one data center) mix of OLTP and batch analysis lots of data, high r/w rates, 1000s of cheap boxes thus many failures

Cmprssd Intrduction To

Exploring NoSQL, Hadoop and HBase

ExamTorrent. Best exam torrent, excellent test torrent, valid exam dumps are here waiting for you

We are ready to serve Latest Testing Trends, Are you ready to learn?? New Batches Info

5/2/16. Announcements. NoSQL Motivation. The New Hipster: NoSQL. Serverless. What is the Problem? Database Systems CSE 414

Hadoop Development Introduction

BigTable: A Distributed Storage System for Structured Data (2006) Slides adapted by Tyler Davis

How do we build TiDB. a Distributed, Consistent, Scalable, SQL Database

Bigtable: A Distributed Storage System for Structured Data by Google SUNNIE CHUNG CIS 612

Database Systems CSE 414

Apache Hadoop Goes Realtime at Facebook. Himanshu Sharma

A BigData Tour HDFS, Ceph and MapReduce

Scaling for Humongous amounts of data with MongoDB

Apache HBase Andrew Purtell Committer, Apache HBase, Apache Software Foundation Big Data US Research And Development, Intel

18-hdfs-gfs.txt Thu Nov 01 09:53: Notes on Parallel File Systems: HDFS & GFS , Fall 2012 Carnegie Mellon University Randal E.

Course Content MongoDB

Big Table. Google s Storage Choice for Structured Data. Presented by Group E - Dawei Yang - Grace Ramamoorthy - Patrick O Sullivan - Rohan Singla

Outline. Spanner Mo/va/on. Tom Anderson

Faster HBase queries. Introducing hindex Secondary indexes for HBase. ApacheCon North America Rajeshbabu Chintaguntla

Bigtable. Presenter: Yijun Hou, Yixiao Peng

Rails on HBase. Zachary Pinter and Tony Hillerson RailsConf 2011

Introduction to Hadoop and MapReduce

Time Series Live 2017

Introduction to NoSQL Databases

A Glimpse of the Hadoop Echosystem

Cassandra- A Distributed Database

Big Data for Engineers Spring Resource Management

Making the Most of Hadoop with Optimized Data Compression (and Boost Performance) Mark Cusack. Chief Architect RainStor

Bigtable: A Distributed Storage System for Structured Data. Andrew Hon, Phyllis Lau, Justin Ng

References. What is Bigtable? Bigtable Data Model. Outline. Key Features. CSE 444: Database Internals

/ Cloud Computing. Recitation 10 March 22nd, 2016

Jargons, Concepts, Scope and Systems. Key Value Stores, Document Stores, Extensible Record Stores. Overview of different scalable relational systems

50 Must Read Hadoop Interview Questions & Answers

Big Data Development CASSANDRA NoSQL Training - Workshop. November 20 to (5 days) 9 am to 5 pm HOTEL DUBAI GRAND DUBAI

CS 655 Advanced Topics in Distributed Systems

HBase Installation and Configuration

Distributed PostgreSQL with YugaByte DB

HBase vs Neo4j. Technical overview. Name: Vladan Jovičić CR09 Advanced Scalable Data (Fall, 2017) Ecolé Normale Superiuere de Lyon

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 12 Google Bigtable

Big Data Exercises. Spring 2018 Week 4 ETH Zurich. HBase

YCSB++ Benchmarking Tool Performance Debugging Advanced Features of Scalable Table Stores

SEARCHING BILLIONS OF PRODUCT LOGS IN REAL TIME. Ryan Tabora - Think Big Analytics NoSQL Search Roadshow - June 6, 2013

GridGain and Apache Ignite In-Memory Performance with Durability of Disk

Voldemort. Smruti R. Sarangi. Department of Computer Science Indian Institute of Technology New Delhi, India. Overview Design Evaluation

Transcription:

Ghislain Fourny Big Data 5. Column stores 1

Introduction 2

Relational model 3

Relational model Schema 4

Issues with relational databases (RDBMS) Small scale Single machine 5

Can we fix a RDBMS? Scale up (remember?) 6

Can we fix a RDBMS? Scale out 7

Can we fix a RDBMS? Cluster Scale out 8

Can we fix a RDBMS? Cluster Replicate Scale out 9

Can we fix a RDBMS? Hard to set up Very high maintenance costs Scale out 10

HBase By design running on a scalable cluster of commodity hardware 11

HBase By design running on a scalable cluster of commodity hardware HDFS 12

Wide column stores: data model 13

Founding paper 's BigTable 14

The tabular model 15

The tabular model: expensive joins 16

Design paradigm of BigTable store together what is accessed together 17

The tabular model: expensive joins 1 4 2 2 4 6 1 2 3 4 5 6 18

The columnar model: denormalized 1 4 2 2 4 6 19

Rows Row ID 000 002 0A1 1E0 22A 4A2 20

Columns Row ID 000 002 0A1 1E0 22A 4A2 21

Columns Column family Row ID 000 002 0A1 1E0 22A 4A2 22

Column families must be known in advance... Row ID 23

Column families must be known in advance... Row ID 000 A B 1 2 I 002 0A1 1E0 22A 4A2 24

... but columns can be added on the fly Row ID 000 A B C 1 2 I II III IV 002 0A1 1E0 22A 4A2 25

Primary queries Get Put Scan Delete 26

Get Row ID 000 A B C 1 2 I II III IV 002 0A1 1E0 22A 4A2 27

Put Row ID 000 A B C 1 2 I II III IV 002 0A1 1E0 204 22A 4A2 28

Scan Row ID 000 A B C 1 2 I II III IV 002 0A1 1E0 204 22A 4A2 29

Delete Row ID 000 A B C 1 2 I II III IV 002 0A1 1E0 204 22A 4A2 30

Some terminology: Key-value model Key Value 31

Some terminology: Column-oriented stores Column1 Column2 32

Some terminology: Column-oriented key-value stores Also: wide column stores, column family-oriented Row ID A B C 1 2 I II III IV 33

Examples of Column-oriented key-value stores 's BigTable 34

Warning on terminology NoSQL is very recent! 35

Warning on terminology Key-value storage Relational table Words have a "life" File Block NoSQL Object storage 36

HBase: physical level 37

Physical layer: regions Row ID A B C 1 2 I II III IV 38

Physical layer: regions Row ID A B C 1 2 I II III IV 39

Physical layer: regions Row ID A B C 1 2 I II III IV Min-incl. Max-excl. 40

Physical layer: column families Row ID A B C 1 2 I II III IV Min-incl. Max-excl. Stored together 41

Architecture "The same procedure as every year, James." 42

HDFS... Namenode /dir/file1 /dir/file2 /file3 Datanode Datanode Datanode Datanode Datanode Datanode 43

HBase HMaster Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 44

HBase HMaster Replicas! Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 45

HMaster HMaster Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 46

HMaster DDL operations Create table Delete table 47

HMaster assigns regions to RegionServers Row ID 48

HMaster assigns regions to RegionServers Row ID 49

HMaster assigns regions to RegionServers Row ID 50

HMaster splits regions Row ID 51

HMaster handles Regionserver failovers 52

Architecture HMaster Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 53

Regionserver HMaster Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 54

Physical storage Row ID Min-incl. A B C 1 2 Stored together I II III IV 55

Physical storage Row ID A B C 1 2 I II III IV Store Store Store Store Store Store 56

Store = column family Row ID 1 2 57

Store = column family Row ID 1 2 Cell 58

Store = column family Row ID 1 2 HFile HFile HFile HFile (On HDFS) 59

HFile HFile 60

HFile HFile That's actually an SSTable (flat sorted list of key-value pairs) 61

HFile HFile KeyValue That's actually an SSTable (flat sorted list of key-value pairs) (Stores a cell) 62

Versioning Different versions of same cell Latest 63

HFile: KeyValue key value 64

HFile: KeyValue (prefix code) keylength valuelength key value 65

HFile: Key row length row (key) column family length column family column qualifier timestamp key type 66

HFile: Key row length row (key) column family length column family column qualifier timestamp key type This one is for the versioning 67

Blocks HFile 68

Blocks HFile "Quantity" of KeyValues that get read at a time 69

Blocks Default HFile 64kb 70

Blocks: long keys or values size(keyvalue) > block size No split (longer block) 71

Levels of physical storage Table 72

Levels of physical storage Table Region 73

Levels of physical storage Table Region Store 74

Levels of physical storage Table Region Store StoreFile 75

Levels of physical storage Table Region Store StoreFile Block 76

Levels of physical storage Table Region Store StoreFile Block KeyValue 77

HBase: Writing new cells 78

On Disk Table Region Store StoreFile Block KeyValue 79

Store StoreFile Block Block StoreFile Block Block 80

Store MemStore radub85 / 123RF Stock Photo StoreFile Block Block StoreFile Block Block 81

In Memory Table Region Store MemStore Cell 82

Writing new cells MemStore StoreFile Block Block 83

Writing new cells MemStore StoreFile Block Block 84

Writing new cells MemStore StoreFile Block Block 85

Writing new cells MemStore StoreFile Block Block 86

Writing new cells MemStore StoreFile Block Block 87

Flush MemStore StoreFile StoreFile Block Block Block Block Sort! 88

Flush When: Reaching max Memstore size in a store Reaching overall max Memstore size Reaching full Write-Ahead Log 89

Reading from a Store MemStore StoreFile Block Block StoreFile Block Block 90

Reading from a Store MemStore StoreFile Block Block StoreFile Block Block 91

Compaction StoreFile StoreFile StoreFile Block Block Block Block Block Block 92

Compaction StoreFile StoreFile StoreFile Block Block Block Block Block Block 93

Compaction StoreFile (Sort again) Block Block Block Block Block Block 94

The META table: a table like any other 95

The META table: stores region locations table + region start key + region id + replica id info: regioninfo info: server www.example.com:0 info: serverstartcode 2016-10-11T10:15:00 96

RegionInfo RegionInfo Table name Start key Region ID Replica ID encodedname End key Split Offline 97

Architecture HMaster Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 98

Architecture HMaster Create/delete/update table Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 99

Architecture HMaster Region? Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver (hosting meta) 100

Architecture HMaster Region? Regionserver location(s) Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 101

Architecture HMaster Query Regionserver Regionserver Regionserver Regionserver Regionserver Regionserver 102

HBase: Underlying APIs grazvydas / 123RF Stock Photo 103

HBase implementation (Packaged code) 104

HBase APIs REST 105

HBase: caching 106

HBase Caches: reading faster LRU block cache Level 1 107

HBase Caches: reading faster LRU block cache bucket cache Level 1 Level 2 108

HBase Caches: reading faster LRU block cache bucket cache HDFS Level 1 Level 2 109

LRU Block Cache On the Least Recently Heap Used 110

LRU Block Cache: levels of priority Single access priority Multi access priority In-memory access priority111

When to NOT use the cache Batch processing 112

When to NOT use the cache Random access 113

Hash function Source: Jorge Stolfi (Wikipedia) 114

Bloom filter Very quickly whether an element belongs to a set (potentially false positives) 115

Bloom filter 0 0 0 0 0 0 0 0 0 0 0 0 116

Bloom filter John Smith hash function 1 hash function 2 hash function k 0 1 1 0 0 0 0 1 0 0 0 0 117

Bloom filter Mary Smith hash function 1 hash function 2 hash function k 0 1 1 0 0 1 1 1 0 0 0 0 118

Bloom filter: not in set 0 1 1 0 0 1 1 1 0 0 0 0 hash function 1 hash function 2 hash function k Albert Einstein? 119

Bloom filter: in set (and correct) 0 1 1 0 0 1 1 1 0 0 0 0 hash function 1 hash function 2 hash function k Mary Smith? 120

Bloom filter: in set (false positive) 0 1 1 0 0 1 1 1 0 0 0 0 hash function 1 hash function 2 hash function k Louis de Broglie? 121

Data Locality 122

HBase vs. HDFS 123

With HDFS load balancer... 124

HFile compaction brings back locality 125

Best practices 126

Number of rows Millions RDBMS Billions HBase 127

Number of nodes > 5 128

10 Design Principles of Big Data 129

1. Learn from the past 130

2. Keep the design simple 131

3. Modularize the architecture 132

4. Homogeneity in the large 133

5. Heterogeneity in the small 134

6. Separate metadata from data 135

7. Abstract logical model from its physical implementation 136

8. Shard the data 137

9. Replicate the data 138

10. Buy lots of cheap hardware 139