Cloudera Kudu Introduction

Slides:



Advertisements
Similar presentations
Megastore: Providing Scalable, Highly Available Storage for Interactive Services. Presented by: Hanan Hamdan Supervised by: Dr. Amer Badarneh 1.
Advertisements

Tomcy Thankachan  Introduction  Data model  Building Blocks  Implementation  Refinements  Performance Evaluation  Real applications  Conclusion.
CS525: Special Topics in DBs Large-Scale Data Management HBase Spring 2013 WPI, Mohamed Eltabakh 1.
The Hadoop RDBMS Replace Oracle with Hadoop John Leach CTO and Co-Founder J.
Google Bigtable A Distributed Storage System for Structured Data Hadi Salimi, Distributed Systems Laboratory, School of Computer Engineering, Iran University.
7/2/2015EECS 584, Fall Bigtable: A Distributed Storage System for Structured Data Jing Zhang Reference: Handling Large Datasets at Google: Current.
Hadoop tutorials. Todays agenda Hadoop Introduction and Architecture Hadoop Distributed File System MapReduce Spark 2.
Distributed storage for structured data
SQL on Hadoop. Todays agenda Introduction Hive – the first SQL approach Data ingestion and data formats Impala – MPP SQL.
Google Distributed System and Hadoop Lakshmi Thyagarajan.
Gowtham Rajappan. HDFS – Hadoop Distributed File System modeled on Google GFS. Hadoop MapReduce – Similar to Google MapReduce Hbase – Similar to Google.
Thanks to our Sponsors! To connect to wireless 1. Choose Uguest in the wireless list 2. Open a browser. This will open a Uof U website 3. Choose Login.
Scale-out databases for CERN use cases Strata Hadoop World London 6 th of May,2015 Zbigniew Baranowski, CERN IT-DB.
The Hadoop Distributed File System: Architecture and Design by Dhruba Borthakur Presented by Bryant Yao.
Bigtable: A Distributed Storage System for Structured Data F. Chang, J. Dean, S. Ghemawat, W.C. Hsieh, D.A. Wallach M. Burrows, T. Chandra, A. Fikes, R.E.
Hypertable Doug Judd Background  Zvents plan is to become the “Google” of local search  Identified the need for a scalable DB 
Oracle Data Block Oracle Concepts Manual. Oracle Rows Oracle Concepts Manual.
HBase A column-centered database 1. Overview An Apache project Influenced by Google’s BigTable Built on Hadoop ▫A distributed file system ▫Supports Map-Reduce.
Some key-value stores using log-structure Zhichao Liang LevelDB Riak.
MapReduce – An overview Medha Atre (May 7, 2008) Dept of Computer Science Rensselaer Polytechnic Institute.
Hadoop tutorials. Todays agenda Hadoop Introduction and Architecture Hadoop Distributed File System MapReduce Spark Cluster Monitoring 2.
Introduction to Hadoop and HDFS
Contents HADOOP INTRODUCTION AND CONCEPTUAL OVERVIEW TERMINOLOGY QUICK TOUR OF CLOUDERA MANAGER.
VLDB2012 Hoang Tam Vo #1, Sheng Wang #2, Divyakant Agrawal †3, Gang Chen §4, Beng Chin Ooi #5 #National University of Singapore, †University of California,
Hive Facebook 2009.
Data storing and data access. Plan Basic Java API for HBase – demo Bulk data loading Hands-on – Distributed storage for user files SQL on noSQL Summary.
Google Bigtable Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, Robert E. Gruber.
Hypertable Doug Judd Zvents, Inc.. hypertable.org Background.
Bigtable: A Distributed Storage System for Structured Data Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows,
Large-scale Incremental Processing Using Distributed Transactions and Notifications Daniel Peng and Frank Dabek Google, Inc. OSDI Feb 2012 Presentation.
Key/Value Stores CMSC 491 Hadoop-Based Distributed Computing Spring 2015 Adam Shook.
1 HBase Intro 王耀聰 陳威宇
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
Data storing and data access. Adding a row with Java API import org.apache.hadoop.hbase.* 1.Configuration creation Configuration config = HBaseConfiguration.create();
Fast Crash Recovery in RAMCloud. Motivation The role of DRAM has been increasing – Facebook used 150TB of DRAM For 200TB of disk storage However, there.
Introduction to Hbase. Agenda  What is Hbase  About RDBMS  Overview of Hbase  Why Hbase instead of RDBMS  Architecture of Hbase  Hbase interface.
Hadoop IT Services Hadoop Users Forum CERN October 7 th,2015 CERN IT-D*
Intuitions for Scaling Data-Centric Architectures
Session 1 Module 1: Introduction to Data Integrity
Nov 2006 Google released the paper on BigTable.
Scalable data access with Impala Zbigniew Baranowski Maciej Grzybek Daniel Lanza Garcia Kacper Surdy.
Bigtable: A Distributed Storage System for Structured Data
1 HBASE – THE SCALABLE DATA STORE An Introduction to HBase XLDB Europe Workshop 2013: CERN, Geneva James Kinley EMEA Solutions Architect, Cloudera.
Data Model and Storage in NoSQL Systems (Bigtable, HBase) 1 Slides from Mohamed Eltabakh.
CS4432: Database Systems II
Department of Computer Science, Johns Hopkins University EN Instructor: Randal Burns 24 September 2013 NoSQL Data Models and Systems.
Apache Accumulo CMSC 491 Hadoop-Based Distributed Computing Spring 2016 Adam Shook.
Select Operation Strategies And Indexing (Chapter 8)
Bigtable A Distributed Storage System for Structured Data.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
1 Gaurav Kohli Xebia Breaking with DBMS and Dating with Relational Hbase.
Hadoop file format studies in IT-DB Analytics WG meeting 20 th of May, 2015 Daniel Lanza, IT-DB.
Apache Kudu Zbigniew Baranowski.
In-Memory Capabilities
Kudu: Fast Analytics on Fast Data
HBase Mohamed Eltabakh
Real-time analytics using Kudu at petabyte scale
Bigtable: A Distributed Storage System for Structured Data
Fast Data Made Easy Ted Malaska Cloudera With Kafka and Kudu
How did it start? • At Google • • • • Lots of semi structured data
INTRODUCTION TO PIG, HIVE, HBASE and ZOOKEEPER
Running virtualized Hadoop, does it make sense?
Database Management Systems (CS 564)
CSE-291 (Cloud Computing) Fall 2016
NOSQL.
Gowtham Rajappan.
Powering real-time analytics on Xfinity using Kudu
Cloud Computing for Data Analysis Pig|Hive|Hbase|Zookeeper
by Mikael Bjerga & Arne Lange
Pig Hive HBase Zookeeper
Presentation transcript:

Cloudera Kudu Introduction Zbigniew Baranowski Based on: http://slideshare.net/cloudera/kudu-new-hadoop-storage-for-fast-analytics-on-fast-data

What is KUDU? New storage engine for structured data (tables) – does not use HDFS! Columnar store Mutable (insert, update, delete, scan) Written in C++ Apache-licensed – open source Currently in beta version

Hadoop and KUDU

Yet another engine to store data? HDFS excels at Scanning of large amount of data at speed Accumulating data with high throughput HBASE (on HDFS) excels at Fast random lookups and writing by key Making data mutable

KUDU tries to fill the gap

Addressing evolution in hardware Hard drives -> solid state disks Random scans in milliseconds Analytics no longer IO bound -> CPU bound RAM is getting cheaper – can be used at greater scale

Table oriented storage Table has Hive/RDBMS like schema Primary key (one or many columns), NO secondary indexes Finite number of columns Each column has name and type Horizontally partitioned (range, hash) – called tablets Tablets typically have 3 or 5 replicas

Table access and manipulations Operations on tables (NoSQL) insert, update, delete, scan Java and C++ API Integrated with Impala, MapReduce, Spark more are coming

KUDU table with Impala Source: https://github.com/cloudera/kudu-examples/tree/master/java/collectl CREATE TABLE `metrics` ( `host` STRING, `metric` STRING, `timestamp` INT, `value` DOUBLE ) TBLPROPERTIES( 'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler', 'kudu.table_name' = 'metrics', 'kudu.master_addresses' = 'quickstart.cloudera:7051', 'kudu.key_columns' = 'host, metric, timestamp' ); insert into metrics values (‘myhost’,’temp1’, 1449005452,0.5343242); select count(distinct metric) from metrics; delete from metrics where host=‘myhost’ and metric=’temp1’ …..;

KUDU with Spark import org.kududb.mapreduce._ import org.apache.hadoop.conf.Configuration import org.kududb.client._ import org.apache.hadoop.io.NullWritable; val conf = new Configuration conf.set("kudu.mapreduce.master.address", "quickstart.cloudera"); conf.set("kudu.mapreduce.input.table", "metrics"); conf.set("kudu.mapreduce.column.projection", "host,metric,timestamp,value"); val kuduRdd = sc.newAPIHadoopRDD(conf, classOf[KuduTableInputFormat], classOf[NullWritable], classOf[RowResult]) // Print the first five values kuduRdd.values.map(r => r.rowToString()).take(5).foreach(x => print(x + "\n"))

Data Consistency Reading Writing Snapshot consistency Point in time queries (based on provided timestamp) Writing Single row mutations done atomically across all columns No multi-row transactions

Architecture overview Master server (single) Keeps metadata replicated Catalog (tables definitions) in a KUDU table (cached) Coordination (full view of the cluster) Tablets directory (tablets locations) (in memory) Fast failover supported Tablets Server (worker nodes) Stores/servers tablets On local disks (no HDFS) Tracks status of tablets replicas (followers)

Tables and tablets Metadata Data

When to use? When sequential and random data access is required simultaneously When simplification of a data ingest is needed When updates on data are required Examples Time series Streaming data, immediately available Online reporting

Typical low latency ingestion flow

Simplified ingestion flow with KUDU

Benchmarking by Cloudera

Benchmarking by customer (Xiaomi)

KUDU under the hood

Data replication - Raft consensus Master Get tablets locations Client Tablet server X Write WAL Tablet 1 (leader) Success Confirm Write Write Confirm Tablet server Y Tablet server Z WAL WAL Tablet 1 (follower) Tablet 1 (follower)

Data Insertion (without uniqueness check) Tablets Server MemRowSet B+tree Row: Col1,Col2, Col3 INSERT Leafs sorted by Primary Key Row1,Row2,Row3 Flush Columnar store encoded similarly to Parquet Rows sorted by PK. DiskRowSet1 (32MB) PK {min, max} PK Bloom filters Bloom filters for PK ranges. Stored in cached btree Col1 Col2 Col3 Interval tree Interval tree keeps track of PK ranges within DiskRowSets DiskRowSet2 (32MB) PK {min, max} PK Bloom filters Col1 Col2 Col3 There might be Ks of sets per tablet

Column encoding within DiskRowSet Pages with data Index for given column For PK: maps row keys to pages Values Size 256KB Page metadata For a standard column: maps row offsets to pages Values Pages are encoded witha variety of encodings, such as dictionary encoding, bitshuffle, or front coding Btree index Page metadata Values Page metadata Values Pages can be compressed: LZ4, gzip, or bzip2 Page metadata

DiskRowSet compaction Periodical task Removes deleted rows Reduces the number of sets with overlapping PK ranges Does not create bigger DiskRowSets 32MB size for each DRS is preserver DiskRowSet1 (32MB) PK {A, G} DiskRowSet1 (32MB) PK {A, D} Compact DiskRowSet2 (32MB) PK {B, E} DiskRowSet2 (32MB) PK {E, G}

Data updates PK has to be provided for UPDATE and DELETE MemRowSet Set Col2=x where Col1=y Using DRS PK ranges and boom filters B+tree Row1,Row2,Row3 Look for Col1=y DiskRowSet1 (32MB) PK {min, max} Look for Col1=y (row_offset, time): Col2=x If the row is there, get its offset PK Bloom filters Col1 Col2 Col3 Compactions are done periodically DiskRowSet2 (32MB) PK {min, max} MemDeltaStore DeltaStore (on disk) B+tree PK Bloom filters Compactions Col1 Col2 Col3 Flush (row_offset,time),…

Summary KUDU is NOT KUDU is trying to be a compromise between a SQL database, a filesystem, an in-memory database not a direct replacement for Hbase or HDFS KUDU is trying to be a compromise between Fast sequential scans Fast random reads Simplifies data ingestion model

Learn more Video: https://www.oreilly.com/ideas/kudu-resolving-transactional-and-analytic-trade-offs-in-hadoop Whitepaper: http://getkudu.io/kudu.pdf KUDU project: https://github.com/cloudera/kudu Get Cloudera Quickstart VM and test it