SlideShare a Scribd company logo
1© Cloudera, Inc. All rights reserved.
Introducing Apache Kudu
(incubating)
Mladen Kovacevic | Solutions Architect
May 2016
Adapted from Jeremy Beard’s original presentation in New York, Dec 2015
2© Cloudera, Inc. All rights reserved.
Presenter
• Mladen Kovacevic
• Solutions Architect at Cloudera (Toronto based)
• 2+ yrs in Big Data
• 3+ yrs building workload optimized systems, exploiting hardware features to
improve software performance and capability (compute, storage, networking)
• 6+ yrs engine development enterprise RDBMS
mladen@cloudera.com
3© Cloudera, Inc. All rights reserved.
Current storage landscape in Hadoop
HDFS (GFS) excels at:
• Scanning large amounts of data
• Accumulating data with high
throughput
HBase (BigTable) excels at:
• Efficiently finding and writing
individual rows
• Making data mutable
Gaps exist when these properties
are needed simultaneously
4© Cloudera, Inc. All rights reserved.
Managing the gap (today)
Code Complexity
• Manage flow and sync of data between HDFS and HBase
Monitoring and Security
• Managing consistent backups, security policies, monitoring and more is hard
Performance
• Significant lag between arrival of HBase data “staging” and time when data is
available for analytics.
5© Cloudera, Inc. All rights reserved.
Hardware landscape is changing
rethink design!
• Spinning disk (HDD) -> solid state storage (SSD)
• NAND flash: Up to 450k read 250k write IOPS, about 2GB/sec read and 1.5GB/sec
write throughput, at a price of less than $3/GB and dropping
• 3D XPoint memory – persistent storage (1000x faster than NAND, cheaper than RAM)
• RAM is cheaper and more abundant:
• 64->128->256GB over last few years
• Takeaway 1: The next bottleneck is CPU, and current storage heavy applications weren’t
designed with CPU efficiency in mind
• Takeaway 2: Column stores are feasible for random access
6© Cloudera, Inc. All rights reserved.
Apache Kudu (Incubating)
Storage for Fast Analytics on Fast Data
• New updatable column store for Hadoop
• Simplifies the architecture for building analytic
applications on changing data
• Designed for fast analytic performance
• Natively integrated with Hadoop
• Donated as incubating project at
Apache Software Foundation (November
17, 2015)
• Beta v0.8.0 now available
STRUCTURED
Sqoop
UNSTRUCTURED
Kafka, Flume
PROCESS, ANALYZE, SERVE
UNIFIED SERVICES
RESOURCE MANAGEMENT
YARN
SECURITY
Sentry, RecordService
FILESYSTEM
HDFS
RELATIONAL
Kudu
NoSQL
HBase
STORE
INTEGRATE
BATCH
Spark, Hive, Pig
MapReduce
STREAM
Spark
SQL
Impala
SEARCH
Solr
SDK
Kite
7© Cloudera, Inc. All rights reserved.
• High throughput for big scans (columnar storage and
replication)
Goal: Within 2x of Parquet
• Low-latency for short accesses (primary key indexes
and quorum design)
Goal: 1ms read/write on SSD
• Database-like semantics (initially single-row ACID)
• Relational data model (tables/schemas)
• Easily integrate with SQL engines (Impala, Drill, Hive)
• “NoSQL” style scan/insert/update (Java, C++, Python
clients)
Kudu design goals
8© Cloudera, Inc. All rights reserved.
What Kudu is not
• Not a SQL interface
• Just the storage layer
• “BYOSQL” – Bring-your-own SQL
• Not a file system
• Data must have tabular structure
• Not an application that runs on HDFS
• An alternative, native Hadoop storage engine
• Not a replacement for HDFS or HBase
• Select the right storage for the right use case
• Cloudera will continue to support and invest in all three
9© Cloudera, Inc. All rights reserved.
What Kudu is
STORAGE SYSTEM
for
TABLES
of
STRUCTURED DATA
No SQL engine, nor query planner, nor
optimizer.
Storage system that lets you get at
your data quickly (random/scan).
Highly scalable, with ability to provide
higher level systems info to exploit its
abilities (ie. locality).
Data logically presented to clients as
rows and finite set of columns
Stored in columnar format
Tables are partitioned across tablets
managed by tablet servers.
Tablets are replicated managed by Raft
consensus.
Strongly typed columns
Finite number of columns
Add/remove columns solely by ALTER
TABLE statements
10© Cloudera, Inc. All rights reserved.
About Kudu
• Apache-licensed open source software
• Structured data model
• Basic construct: tables
• Tables broken down into tablets (roughly equivalent to partitions)
• Architecture supports geographically disparate, active/active systems
• Not the initial design goal
11© Cloudera, Inc. All rights reserved.
Kudu data model
• Tables have a RDBMS-like schema
• Finite number of columns (unlike HBase/Cassandra)
• Types: BOOL, INT8/16/32/64, FLOAT, DOUBLE, STRING, BINARY, TIMESTAMP
• Some subset of columns make up a primary key
• Fast random reads/writes by primary key
• No secondary indexes (yet)
• Columnar layout on disk – Parquet-like
• Lazy materialization
• Encoding and compression options
11
12© Cloudera, Inc. All rights reserved.
Table partitioning
• Hash bucketing
• Distribute records by hash of partition column(s)
• N buckets leads to N tablets
• Range partitioning
• Distribute records by ranges of the partition column(s)
• N split keys leads to N tablets
• Can be a mix for different columns of the primary key
13© Cloudera, Inc. All rights reserved.
Kudu tables are partitioned into “tablets” (regions)
Partitioning based on
primary key (PK)
• Native support for
range partitioning
and/or hash
partitioning (salting)
• Hash example:
PRIMARY KEY
(tweet_id) DISTRIBUTE
BY HASH(tweet_id)
INTO 100 BUCKETS
14© Cloudera, Inc. All rights reserved.
Each tablet is fault tolerant via Raft consensus
• A single Tablet Server can
host many tablets
• Metadata is stored on just
another tablet, but only
Master Server processes
host that tablet
• Raft consensus:
• Strong consistency
• Leader election on failure
• Replication factor 3 or 5 is
typical
15© Cloudera, Inc. All rights reserved.
Consistency model
• Consistency and replication enforced by Raft consensus (similar to Paxos)
• Replication by operation not data
• Single-row transactions now
• Multi-row transactions later
• Geo-distributed replicas will be possible under strict time synchronization
• Techniques drawn from Google Spanner and others
16© Cloudera, Inc. All rights reserved.
Kudu interfaces
• NoSQL-style APIs
• Insert(), Update(), Delete(), Scan()
• Java, C++, limited Python
• Integrations with MapReduce, Spark, and Impala
• No direct access to underlying Kudu tablet files
• Beta does not have authentication, authorization, encryption
17© Cloudera, Inc. All rights reserved.
Impala integration
• Opens up Kudu to JDBC/ODBC clients
• Intuitive way to get data into Kudu
• INSERT INTO kudu_table SELECT * FROM src_table;
• Additional commands
• UPDATE
• DELETE
• Efficient INSERT VALUES
• Runs on the Kudu C++ client
18© Cloudera, Inc. All rights reserved.
Performance characteristics
Very CPU efficient
• Written in modern C++, uses specialized CPU instructions (SIMD), JIT
compilation with LLVM
Latency dependent on storage hardware capabilities
• Expect sub-millisecond response on SSDs and upcoming technologies
No garbage collection allows very large memory footprint with no pauses
Bloom filters reduce the need for many disk accesses
19© Cloudera, Inc. All rights reserved.
Operating Kudu
• Easiest through Cloudera Manager integration
• Separate parcel for now
• Kudu is always compacting
• No minor vs. major compaction
• No compaction latency spikes
• Web UI is full of metrics and logs
20© Cloudera, Inc. All rights reserved.
Cluster layout
• One or multiple masters for failover
• Only one in current beta
• Low CPU and memory impact
• One tablet server per worker node
• Can share disks with HDFS
• One SSD per worker node just for Kudu WAL can speed up writes
• No dependencies on other Hadoop ecosystem components
• But interfacing components like Impala or Spark do
21© Cloudera, Inc. All rights reserved.
Kudu: Cluster metadata management
• Replicated master
• Acts as a tablet directory
• Acts as a catalog (which tables exist, etc)
• Acts as a load balancer (tracks TS liveness, re-replicates under-replicated
tablets)
• Caches all metadata in RAM for high performance
• Under heavy load, 99.99% response times still in microseconds (650us)
• Client configured with master addresses
• Client asks master for tablet locations as needed and caches them locally
22© Cloudera, Inc. All rights reserved.
Real-time analytics in Hadoop today
Merging in new data = storage complexity
Downsides:
● Multiple storage layers
● Latest data is hidden
● Files are messy
● Complex to do updates
without breaking running
queriesNew Partition
Most Recent Partition
Historic Data
HBase
Parquet
File
Have we
accumulated
enough data?
Reorganize
HBase file
into Parquet
• Wait for running operations to complete
• Define new Impala partition referencing
the newly written Parquet file
Incoming Data
(Messaging
System)
Reporting
Request
HDFS + Impala
23© Cloudera, Inc. All rights reserved.
Real-time analytics in Hadoop with Kudu
Improvements:
● One system to operate
● No schedules or
background processes
● Handle late arrivals or data
corrections with ease
● New data available
immediately for analytics
or operations
Historical and Real-time
Data
Incoming Data
(Messaging
System)
Reporting
Request
Kudu + Impala
24© Cloudera, Inc. All rights reserved.
Kudu for data warehousing
• Near real time data visibility
• BI tools can display events that happened seconds earlier
• Excellent for star schemas
• Fast scans of deep fact tables
• Efficient wide fact tables
• Simplified updates of slowly changing dimensions
25© Cloudera, Inc. All rights reserved.
Near real time data warehousing on Kudu
Files
RDBMS
Streams
K
A
F
K
A
K
U
D
U
IMPALA
HUE
BI tools
User
FLUME
SPARK
STREAMING
Simple
Complex
26© Cloudera, Inc. All rights reserved.
Resources
Join the community
http://getkudu.io
kudu-user@googlegroups.com
Download the beta
cloudera.com/downloads
Read the whitepaper
getkudu.io/kudu.pdf
27© Cloudera, Inc. All rights reserved.
Demo
• Load a standard HDFS Parquet table
• Create a Kudu table via Impala
• INSERT/UPDATE/DELETE statement with Impala
• Spark insert into Kudu table sample job
• Reading from Parquet files as input
• Map task to insert each row into Kudu
28© Cloudera, Inc. All rights reserved.
Creating a Kudu table - Impala
Kudu Storage handler
Table name in Impala
does NOT match table
name in Kudu. Kudu is
its own storage layer.
Kudu Master hostname and port
A primary key is mandatory
29© Cloudera, Inc. All rights reserved.
Spark (Scala) code – Java APIDataFrame Row
Kudu Master hostname and port
Kudu table name
Create a client, session and table object
Extract values from the row, strong types
Create an insert object and row
Set the values by type, column name and column valule
Perform the actual insert
Cleanup
30© Cloudera, Inc. All rights reserved.
Kudu with Spark DataFrames
Tie in Kudu with Spark
Map of the Kudu table name, and Kudu master
Table name to refer to within Spark
SparkSQL statement
31© Cloudera, Inc. All rights reserved.
Kudu code examples and docs
https://github.com/cloudera/kudu-examples
http://www.cloudera.com/documentation/betas/kudu/0-7-
0/topics/kudu_development.html
http://getkudu.io/docs/developing.html
32© Cloudera, Inc. All rights reserved.
Thank you
mladen@cloudera.com

More Related Content

PPTX
Introduction to Kudu: Hadoop Storage for Fast Analytics on Fast Data - Rüdige...
PDF
Kudu - Fast Analytics on Fast Data
PPTX
Introducing Kudu
PPTX
Using Kafka and Kudu for fast, low-latency SQL analytics on streaming data
PDF
Kudu: Fast Analytics on Fast Data
PPTX
Introduction to Apache Kudu
PDF
Kudu: Resolving Transactional and Analytic Trade-offs in Hadoop
Introduction to Kudu: Hadoop Storage for Fast Analytics on Fast Data - Rüdige...
Kudu - Fast Analytics on Fast Data
Introducing Kudu
Using Kafka and Kudu for fast, low-latency SQL analytics on streaming data
Kudu: Fast Analytics on Fast Data
Introduction to Apache Kudu
Kudu: Resolving Transactional and Analytic Trade-offs in Hadoop

What's hot (20)

PPTX
February 2016 HUG: Apache Kudu (incubating): New Apache Hadoop Storage for Fa...
PPTX
Intro to Apache Kudu (short) - Big Data Application Meetup
PDF
Apache kudu
PPTX
A brave new world in mutable big data relational storage (Strata NYC 2017)
PDF
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
PDF
Big Data Day LA 2016/ Big Data Track - How To Use Impala and Kudu To Optimize...
PDF
Introducing Kudu, Big Data Warehousing Meetup
PPTX
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
PDF
Introduction to Apache Kudu
PPTX
Building Effective Near-Real-Time Analytics with Spark Streaming and Kudu
PDF
Big Data Day LA 2016/ NoSQL track - Apache Kudu: Fast Analytics on Fast Data,...
PPTX
High concurrency,
Low latency analytics
using Spark/Kudu
PPTX
January 2015 HUG: Using HBase Co-Processors to Build a Distributed, Transacti...
PDF
SQL Engines for Hadoop - The case for Impala
PPTX
Kudu: New Hadoop Storage for Fast Analytics on Fast Data
PPTX
Architecting Applications with Hadoop
PPTX
SFHUG Kudu Talk
PDF
Low latency high throughput streaming using Apache Apex and Apache Kudu
PDF
Improving Apache Spark by Taking Advantage of Disaggregated Architecture
February 2016 HUG: Apache Kudu (incubating): New Apache Hadoop Storage for Fa...
Intro to Apache Kudu (short) - Big Data Application Meetup
Apache kudu
A brave new world in mutable big data relational storage (Strata NYC 2017)
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
Big Data Day LA 2016/ Big Data Track - How To Use Impala and Kudu To Optimize...
Introducing Kudu, Big Data Warehousing Meetup
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Introduction to Apache Kudu
Building Effective Near-Real-Time Analytics with Spark Streaming and Kudu
Big Data Day LA 2016/ NoSQL track - Apache Kudu: Fast Analytics on Fast Data,...
High concurrency,
Low latency analytics
using Spark/Kudu
January 2015 HUG: Using HBase Co-Processors to Build a Distributed, Transacti...
SQL Engines for Hadoop - The case for Impala
Kudu: New Hadoop Storage for Fast Analytics on Fast Data
Architecting Applications with Hadoop
SFHUG Kudu Talk
Low latency high throughput streaming using Apache Apex and Apache Kudu
Improving Apache Spark by Taking Advantage of Disaggregated Architecture
Ad

Viewers also liked (18)

PDF
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
PPTX
Apache Phoenix Query Server PhoenixCon2016
PPTX
Apache Phoenix and Apache HBase: An Enterprise Grade Data Warehouse
DOCX
2016 Resume Current JB
PPTX
The Stream Processor as a Database Apache Flink
PDF
Bases de datos en la nube con AWS
PDF
AWS CLOUD 2017 - AWS 코어팀과 함께하는 고객 성공 전략 (황인철 상무 & 박성훈 테크니컬 어카운트 매니저 & 김소희 컨설턴트)
PPTX
AWS Services Overview
PDF
Amazon 인공 지능(AI) 서비스 및 AWS 기반 딥러닝 활용 방법 - 윤석찬 (AWS, 테크에반젤리스트)
PDF
10 Tips for Connecting with Your Audience
PDF
Leading the Perfect Q&A in Any Presentation
PDF
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...
PDF
5 Myths on How to be More Eloquent during Presentation
PDF
The SlideShare Handbook
PPTX
Ask the Trainer - Treinamentos e Certificações da AWS
PDF
PechaKucha: The Japanese-inspired Presentation Format
PDF
How to Manage Your Anxiety When Presenting
PDF
5 tools for an awesome presentation-By Samid Razzak
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
Apache Phoenix Query Server PhoenixCon2016
Apache Phoenix and Apache HBase: An Enterprise Grade Data Warehouse
2016 Resume Current JB
The Stream Processor as a Database Apache Flink
Bases de datos en la nube con AWS
AWS CLOUD 2017 - AWS 코어팀과 함께하는 고객 성공 전략 (황인철 상무 & 박성훈 테크니컬 어카운트 매니저 & 김소희 컨설턴트)
AWS Services Overview
Amazon 인공 지능(AI) 서비스 및 AWS 기반 딥러닝 활용 방법 - 윤석찬 (AWS, 테크에반젤리스트)
10 Tips for Connecting with Your Audience
Leading the Perfect Q&A in Any Presentation
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...
5 Myths on How to be More Eloquent during Presentation
The SlideShare Handbook
Ask the Trainer - Treinamentos e Certificações da AWS
PechaKucha: The Japanese-inspired Presentation Format
How to Manage Your Anxiety When Presenting
5 tools for an awesome presentation-By Samid Razzak
Ad

Similar to Introducing Apache Kudu (Incubating) - Montreal HUG May 2016 (20)

PPTX
Introduction to Kudu - StampedeCon 2016
PDF
Building a Hadoop Data Warehouse with Impala
PDF
Building a Hadoop Data Warehouse with Impala
PDF
Kudu Cloudera Meetup Paris
PDF
Cloudera Operational DB (Apache HBase & Apache Phoenix)
PDF
Kudu austin oct 2015.pptx
PPTX
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014
PDF
Spark Summit EU talk by Mike Percy
PDF
Gestione gerarchica dei dati con SUSE Enterprise Storage e HPE DMF
PPTX
Bay Area Impala User Group Meetup (Sept 16 2014)
PDF
MySQL in the Hosted Cloud
PPTX
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...
PDF
Cloudera Impala - San Diego Big Data Meetup August 13th 2014
PPTX
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...
PPTX
Getting Started with Hadoop
PDF
P.Maharajothi,II-M.sc(computer science),Bon secours college for women,thanjavur.
PDF
Apache Kudu Fast Analytics on Fast Data (Hadoop / Spark Conference Japan 2016...
PDF
Improving Apache Spark by Taking Advantage of Disaggregated Architecture
PPTX
Spark One Platform Webinar
PDF
Impala tech-talk by Dimitris Tsirogiannis
Introduction to Kudu - StampedeCon 2016
Building a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with Impala
Kudu Cloudera Meetup Paris
Cloudera Operational DB (Apache HBase & Apache Phoenix)
Kudu austin oct 2015.pptx
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014
Spark Summit EU talk by Mike Percy
Gestione gerarchica dei dati con SUSE Enterprise Storage e HPE DMF
Bay Area Impala User Group Meetup (Sept 16 2014)
MySQL in the Hosted Cloud
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...
Cloudera Impala - San Diego Big Data Meetup August 13th 2014
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...
Getting Started with Hadoop
P.Maharajothi,II-M.sc(computer science),Bon secours college for women,thanjavur.
Apache Kudu Fast Analytics on Fast Data (Hadoop / Spark Conference Japan 2016...
Improving Apache Spark by Taking Advantage of Disaggregated Architecture
Spark One Platform Webinar
Impala tech-talk by Dimitris Tsirogiannis

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
KodekX | Application Modernization Development
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Advanced Soft Computing BINUS July 2025.pdf
GamePlan Trading System Review: Professional Trader's Honest Take
NewMind AI Monthly Chronicles - July 2025
Spectral efficient network and resource selection model in 5G networks
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Per capita expenditure prediction using model stacking based on satellite ima...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KodekX | Application Modernization Development
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction

Introducing Apache Kudu (Incubating) - Montreal HUG May 2016

  • 1. 1© Cloudera, Inc. All rights reserved. Introducing Apache Kudu (incubating) Mladen Kovacevic | Solutions Architect May 2016 Adapted from Jeremy Beard’s original presentation in New York, Dec 2015
  • 2. 2© Cloudera, Inc. All rights reserved. Presenter • Mladen Kovacevic • Solutions Architect at Cloudera (Toronto based) • 2+ yrs in Big Data • 3+ yrs building workload optimized systems, exploiting hardware features to improve software performance and capability (compute, storage, networking) • 6+ yrs engine development enterprise RDBMS mladen@cloudera.com
  • 3. 3© Cloudera, Inc. All rights reserved. Current storage landscape in Hadoop HDFS (GFS) excels at: • Scanning large amounts of data • Accumulating data with high throughput HBase (BigTable) excels at: • Efficiently finding and writing individual rows • Making data mutable Gaps exist when these properties are needed simultaneously
  • 4. 4© Cloudera, Inc. All rights reserved. Managing the gap (today) Code Complexity • Manage flow and sync of data between HDFS and HBase Monitoring and Security • Managing consistent backups, security policies, monitoring and more is hard Performance • Significant lag between arrival of HBase data “staging” and time when data is available for analytics.
  • 5. 5© Cloudera, Inc. All rights reserved. Hardware landscape is changing rethink design! • Spinning disk (HDD) -> solid state storage (SSD) • NAND flash: Up to 450k read 250k write IOPS, about 2GB/sec read and 1.5GB/sec write throughput, at a price of less than $3/GB and dropping • 3D XPoint memory – persistent storage (1000x faster than NAND, cheaper than RAM) • RAM is cheaper and more abundant: • 64->128->256GB over last few years • Takeaway 1: The next bottleneck is CPU, and current storage heavy applications weren’t designed with CPU efficiency in mind • Takeaway 2: Column stores are feasible for random access
  • 6. 6© Cloudera, Inc. All rights reserved. Apache Kudu (Incubating) Storage for Fast Analytics on Fast Data • New updatable column store for Hadoop • Simplifies the architecture for building analytic applications on changing data • Designed for fast analytic performance • Natively integrated with Hadoop • Donated as incubating project at Apache Software Foundation (November 17, 2015) • Beta v0.8.0 now available STRUCTURED Sqoop UNSTRUCTURED Kafka, Flume PROCESS, ANALYZE, SERVE UNIFIED SERVICES RESOURCE MANAGEMENT YARN SECURITY Sentry, RecordService FILESYSTEM HDFS RELATIONAL Kudu NoSQL HBase STORE INTEGRATE BATCH Spark, Hive, Pig MapReduce STREAM Spark SQL Impala SEARCH Solr SDK Kite
  • 7. 7© Cloudera, Inc. All rights reserved. • High throughput for big scans (columnar storage and replication) Goal: Within 2x of Parquet • Low-latency for short accesses (primary key indexes and quorum design) Goal: 1ms read/write on SSD • Database-like semantics (initially single-row ACID) • Relational data model (tables/schemas) • Easily integrate with SQL engines (Impala, Drill, Hive) • “NoSQL” style scan/insert/update (Java, C++, Python clients) Kudu design goals
  • 8. 8© Cloudera, Inc. All rights reserved. What Kudu is not • Not a SQL interface • Just the storage layer • “BYOSQL” – Bring-your-own SQL • Not a file system • Data must have tabular structure • Not an application that runs on HDFS • An alternative, native Hadoop storage engine • Not a replacement for HDFS or HBase • Select the right storage for the right use case • Cloudera will continue to support and invest in all three
  • 9. 9© Cloudera, Inc. All rights reserved. What Kudu is STORAGE SYSTEM for TABLES of STRUCTURED DATA No SQL engine, nor query planner, nor optimizer. Storage system that lets you get at your data quickly (random/scan). Highly scalable, with ability to provide higher level systems info to exploit its abilities (ie. locality). Data logically presented to clients as rows and finite set of columns Stored in columnar format Tables are partitioned across tablets managed by tablet servers. Tablets are replicated managed by Raft consensus. Strongly typed columns Finite number of columns Add/remove columns solely by ALTER TABLE statements
  • 10. 10© Cloudera, Inc. All rights reserved. About Kudu • Apache-licensed open source software • Structured data model • Basic construct: tables • Tables broken down into tablets (roughly equivalent to partitions) • Architecture supports geographically disparate, active/active systems • Not the initial design goal
  • 11. 11© Cloudera, Inc. All rights reserved. Kudu data model • Tables have a RDBMS-like schema • Finite number of columns (unlike HBase/Cassandra) • Types: BOOL, INT8/16/32/64, FLOAT, DOUBLE, STRING, BINARY, TIMESTAMP • Some subset of columns make up a primary key • Fast random reads/writes by primary key • No secondary indexes (yet) • Columnar layout on disk – Parquet-like • Lazy materialization • Encoding and compression options 11
  • 12. 12© Cloudera, Inc. All rights reserved. Table partitioning • Hash bucketing • Distribute records by hash of partition column(s) • N buckets leads to N tablets • Range partitioning • Distribute records by ranges of the partition column(s) • N split keys leads to N tablets • Can be a mix for different columns of the primary key
  • 13. 13© Cloudera, Inc. All rights reserved. Kudu tables are partitioned into “tablets” (regions) Partitioning based on primary key (PK) • Native support for range partitioning and/or hash partitioning (salting) • Hash example: PRIMARY KEY (tweet_id) DISTRIBUTE BY HASH(tweet_id) INTO 100 BUCKETS
  • 14. 14© Cloudera, Inc. All rights reserved. Each tablet is fault tolerant via Raft consensus • A single Tablet Server can host many tablets • Metadata is stored on just another tablet, but only Master Server processes host that tablet • Raft consensus: • Strong consistency • Leader election on failure • Replication factor 3 or 5 is typical
  • 15. 15© Cloudera, Inc. All rights reserved. Consistency model • Consistency and replication enforced by Raft consensus (similar to Paxos) • Replication by operation not data • Single-row transactions now • Multi-row transactions later • Geo-distributed replicas will be possible under strict time synchronization • Techniques drawn from Google Spanner and others
  • 16. 16© Cloudera, Inc. All rights reserved. Kudu interfaces • NoSQL-style APIs • Insert(), Update(), Delete(), Scan() • Java, C++, limited Python • Integrations with MapReduce, Spark, and Impala • No direct access to underlying Kudu tablet files • Beta does not have authentication, authorization, encryption
  • 17. 17© Cloudera, Inc. All rights reserved. Impala integration • Opens up Kudu to JDBC/ODBC clients • Intuitive way to get data into Kudu • INSERT INTO kudu_table SELECT * FROM src_table; • Additional commands • UPDATE • DELETE • Efficient INSERT VALUES • Runs on the Kudu C++ client
  • 18. 18© Cloudera, Inc. All rights reserved. Performance characteristics Very CPU efficient • Written in modern C++, uses specialized CPU instructions (SIMD), JIT compilation with LLVM Latency dependent on storage hardware capabilities • Expect sub-millisecond response on SSDs and upcoming technologies No garbage collection allows very large memory footprint with no pauses Bloom filters reduce the need for many disk accesses
  • 19. 19© Cloudera, Inc. All rights reserved. Operating Kudu • Easiest through Cloudera Manager integration • Separate parcel for now • Kudu is always compacting • No minor vs. major compaction • No compaction latency spikes • Web UI is full of metrics and logs
  • 20. 20© Cloudera, Inc. All rights reserved. Cluster layout • One or multiple masters for failover • Only one in current beta • Low CPU and memory impact • One tablet server per worker node • Can share disks with HDFS • One SSD per worker node just for Kudu WAL can speed up writes • No dependencies on other Hadoop ecosystem components • But interfacing components like Impala or Spark do
  • 21. 21© Cloudera, Inc. All rights reserved. Kudu: Cluster metadata management • Replicated master • Acts as a tablet directory • Acts as a catalog (which tables exist, etc) • Acts as a load balancer (tracks TS liveness, re-replicates under-replicated tablets) • Caches all metadata in RAM for high performance • Under heavy load, 99.99% response times still in microseconds (650us) • Client configured with master addresses • Client asks master for tablet locations as needed and caches them locally
  • 22. 22© Cloudera, Inc. All rights reserved. Real-time analytics in Hadoop today Merging in new data = storage complexity Downsides: ● Multiple storage layers ● Latest data is hidden ● Files are messy ● Complex to do updates without breaking running queriesNew Partition Most Recent Partition Historic Data HBase Parquet File Have we accumulated enough data? Reorganize HBase file into Parquet • Wait for running operations to complete • Define new Impala partition referencing the newly written Parquet file Incoming Data (Messaging System) Reporting Request HDFS + Impala
  • 23. 23© Cloudera, Inc. All rights reserved. Real-time analytics in Hadoop with Kudu Improvements: ● One system to operate ● No schedules or background processes ● Handle late arrivals or data corrections with ease ● New data available immediately for analytics or operations Historical and Real-time Data Incoming Data (Messaging System) Reporting Request Kudu + Impala
  • 24. 24© Cloudera, Inc. All rights reserved. Kudu for data warehousing • Near real time data visibility • BI tools can display events that happened seconds earlier • Excellent for star schemas • Fast scans of deep fact tables • Efficient wide fact tables • Simplified updates of slowly changing dimensions
  • 25. 25© Cloudera, Inc. All rights reserved. Near real time data warehousing on Kudu Files RDBMS Streams K A F K A K U D U IMPALA HUE BI tools User FLUME SPARK STREAMING Simple Complex
  • 26. 26© Cloudera, Inc. All rights reserved. Resources Join the community http://getkudu.io kudu-user@googlegroups.com Download the beta cloudera.com/downloads Read the whitepaper getkudu.io/kudu.pdf
  • 27. 27© Cloudera, Inc. All rights reserved. Demo • Load a standard HDFS Parquet table • Create a Kudu table via Impala • INSERT/UPDATE/DELETE statement with Impala • Spark insert into Kudu table sample job • Reading from Parquet files as input • Map task to insert each row into Kudu
  • 28. 28© Cloudera, Inc. All rights reserved. Creating a Kudu table - Impala Kudu Storage handler Table name in Impala does NOT match table name in Kudu. Kudu is its own storage layer. Kudu Master hostname and port A primary key is mandatory
  • 29. 29© Cloudera, Inc. All rights reserved. Spark (Scala) code – Java APIDataFrame Row Kudu Master hostname and port Kudu table name Create a client, session and table object Extract values from the row, strong types Create an insert object and row Set the values by type, column name and column valule Perform the actual insert Cleanup
  • 30. 30© Cloudera, Inc. All rights reserved. Kudu with Spark DataFrames Tie in Kudu with Spark Map of the Kudu table name, and Kudu master Table name to refer to within Spark SparkSQL statement
  • 31. 31© Cloudera, Inc. All rights reserved. Kudu code examples and docs https://github.com/cloudera/kudu-examples http://www.cloudera.com/documentation/betas/kudu/0-7- 0/topics/kudu_development.html http://getkudu.io/docs/developing.html
  • 32. 32© Cloudera, Inc. All rights reserved. Thank you mladen@cloudera.com

Editor's Notes

  • #29: Copy and paste text of the above slide: CREATE TABLE kudu_table ( cityid STRING , event_dtm STRING , temperature DOUBLE ) TBLPROPERTIES ( 'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler' , 'kudu.table_name' = 'table_in_kudu' , 'kudu.master_addresses' = 'mladen-kudu-1.vpc.cloudera.com:7051' , 'kudu.key_columns' = 'cityid,event_dtm' );
  • #31: Copy and paste text of the above slide: CREATE TABLE kudu_table ( cityid STRING , event_dtm STRING , temperature DOUBLE ) TBLPROPERTIES ( 'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler' , 'kudu.table_name' = 'table_in_kudu' , 'kudu.master_addresses' = 'mladen-kudu-1.vpc.cloudera.com:7051' , 'kudu.key_columns' = 'cityid,event_dtm' );