SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
© Hortonworks Inc. 2017
Apache Ratis
In Search of a Usable Raft Library
Tsz-Wo Nicholas Sze
11/15/2017
Brown Bag Lunch Talk
Page 1
© Hortonworks Inc. 2017
About Me
• Tsz-Wo Nicholas Sze, Ph.D.
– Software Engineer at Hortonworks
– PMC member/Committer of Apache Hadoop
– Active contributor and committer of Apache Ratis
– Ph.D. from University of Maryland, College Park
– MPhil & BEng from Hong Kong University of Sci & Tech
Page 2
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Agenda
• A brief introduction of RAFT
• Apache Ratis
– Features and use cases
– Demo
• Project Status
– Current development
– Future works
Page 3
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Consensus
• What is consensus?
– Multiple servers to agree a value
• Typical use cases
– Log replication
– Replicated state machines
Page 4
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Consensus Algorithms
• Paxos (1990)
– Work but hard to understand
– Hard to implement (correctly)
• Raft (2014)
• “In Search of an Understandable Consensus Algorithm”
– by Diego Ongaro and John Ousterhout
– USENIX ATC’14, https://raft.github.io
• Motivations
– Easy to understand
– Easy to prove
– Easy to implement
Page 5
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Raft Basic
• Leader Election
– Servers are started as a Follower
– Randomly timeout to become Candidate and start a leader election
• Candidate sends requestVote to other servers
– It becomes the leader once it gets a majority of the votes.
• Append Entries
– Clients send requests to the Leader
– Leader forwards the requests to the Followers
• Leader sends appendEntries to Followers
– When there is no client requests, Leader also sends empty
appendEntries to Followers to maintain leadership
Page 6
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Raft Library
• Our Motations
– Use Raft in Ozone
• “In Search of a Usable Raft Library”
– A long list of Raft implementations is available
– None of them a general library ready to be consumed by other projects.
– Most of them are tied to another project or a part of another project.
• We need a Raft library!
Page 7
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Apache Ratis – A Raft Library
• A brand new, incubating Apache project
– Open source, open development
– Apache License 2.0
– Written in Java 8
• Contributions are welcome!
Page 8
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Ratis: Standard Raft Features
• Leader Election + Log Replication
– Automatically elect a leader among the servers in a Raft group
– Randomized timeout for avoiding split votes
– Log is replicated in the Raft group
• Membership Changes
– Members in a Raft group can be re-configurated in runtime
– Replication factor can be changed in runtime
• Log Compaction
– Snapshot is taken periodically
– Send snapshot instead of a long log history.
Page 9
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Ratis: Pluggability
• Pluggable state machine
– Application must define its state machine
– Example: a key-value map
• Pluggable RPC
– Users may provide their own RPC implementation
– Default implementations: gRPC, Netty, Hadoop RPC
• Pluggable Raft log
– Users may provide their own log implementation
– The default implementation stores log in local files
Page 10
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Data Intensive Applications
• In Raft,
– All transactions and the data are written in the log
– Not suitable for data intensive applications
• In Ratis
– Application could choose to not written all the data to log
– State machine data and log data can be separately managed
– See the FileStore example in ratis-example
Page 11
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Ratis: Asynchronous APIs
• Using gRPC bi-directional stream API
– Netty and Hadoop RPC can support async but not yet implementated
• Server-to-server
– Asynchronous append entires
• Client-to-server
– Asynchronous client requests
– RATIS-113: just committed yesterday (11/14/2017)
– Need to fix out-of-order issues RATIS-140 and RATIS-141
Page 12
Architecting the Future of Big Data
© Hortonworks Inc. 2017
General Ratis Use Cases
• You already have a service running on a single server.
• You want to:
– (1) replicate the server log/states to multiple machines
• The replication number/cluster membership can be changed in runtime
• It can tolerate server failures.
• or
– (2) have a HA (highly available) service
• When a server fails, another server will automatically take over.
• Clients automatically failover to the new server.
• Apache Ratis is for you!
Page 13
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Ozone/HDFS Use Cases
• Replicating open containers
– HDFS-11519
• Ozone: Implement XceiverServerSpi and XceiverClientSpi using Ratis
• Committed on 4/3/2017
• Support HA in SCM
– HDFS-11443
• Ozone: Support SCM multiple instances for HA
• Replacing the current Namenode HA solution
– No JIRA yet
Page 14
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Example: ArithmeticStateMachine
• Maintain a variable map (variable -> value)
– Users define the variables and expresions
– Then, submit assignment messages
Page 15
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Demo: ArithmeticStateMachine
• Pythagorean
– Put a = 3 and b = 4
– Find c
• Special thanks to Marton Elek for working on RATIS-95
(CLI to run examples) so that this demo is possible!
Page 16
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Gauss-Legendre
• A.k.a the arithmetic–geometric mean method
• A fast algorithm to compute pi
Page 17
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Example: FileStore (RATIS-122)
• Maintain a file map (key -> file)
• Support only
– Read, Write, Delete
• But not other operations such as
– List, Rename, etc.
• Asynchronous & In-order
– Client may submit multiple write requests to
• Write to multiple files at the same time
• Each file may have multiple write requests
• File data is managed by the state machine
– But not store in the raft log
Page 18
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Ratis: Development Status
• A brief history
– 2016-03: Project started at Hortonworks
– 2016-04: First commit “leader election (without tests)”
– 2017-01: Entered Apache incubation.
– 2017-03: Started preparing the first Alpha release (RATIS-53).
– 2017-04: Hadoop Ozone branch started using Ratis (HDFS-11519)!
– 2017-05: First Release 0.1.0-alpha
– 2017-11: Preparing the second Release 0.2.0-alpha
Page 19
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Work in Progress
• Multi-Raft
– General idea: Allow a server to join multiple Raft groups (RATIS-91)
• When the #groups is large, it is hard to manage the logs
• May assume SSD for log storage
– Short term goal: Allow a server to join a small number of groups
• “Small” means 2 or 3
• Use a small number of pre-configurated storage locations
• Big benefit: servers could transition from one group to another group
• Replicated Map (RATIS-40)
– A sorted map similar to ZooKeeper/etcd/LogCabin
– Intended to be used in production
Page 20
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Ratis: Future Works
• Performance
– Fix gRPC async bugs: RATIS-140 and RATIS-141
– Use FileStore as benchmarks
• Metrics
• Security
• API Specification
• Documentations
– Project web site
• Jerkins Builds
– Checkstyle configuration
Page 21
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Contributors
– Animesh Trivedi, Anu Engineer, Arpit Agarwal, Brent,
– Chen Liang, Chris Nauroth, Devaraj Das, Enis Soztutar,
– garvit, Hanisha Koneru, Hugo Louro, Jakob Homan,
– Jian He, Jing Chen, Jing Zhao, Jitendra Pandey, Junping Du,
– kaiyangzhang, Karl Heinz Marbaise, Li Lu, Lokesh Jain,
– Marton Elek, Mayank Bansal, Mingliang Liu,
– Mukul Kumar Singh, Sen Zhang, Sriharsha Chintalapani,
– Tsz Wo Nicholas Sze, Uma Maheswara Rao G,
– Venkat Ranganathan, Wangda Tan, Weiqing Yang,
– Will Xu, Xiaobing Zhou, Xiaoyu Yao, Yubo Xu, yue liu,
– Zhiyuan Yang
Page 22
Architecting the Future of Big Data
© Hortonworks Inc. 2017
Thank you!
Contributions are welcome!
• http://incubator.apache.org/projects/ratis.html
• dev@ratis.incubator.apache.org
Java question: What is <?> in above? !
Architecting the Future of Big Data
Page 23

Weitere ähnliche Inhalte

Was ist angesagt?

ORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big DataORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big DataDataWorks Summit
 
How We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IOHow We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IODatabricks
 
What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?DataWorks Summit
 
Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2ScyllaDB
 
Bootstrapping state in Apache Flink
Bootstrapping state in Apache FlinkBootstrapping state in Apache Flink
Bootstrapping state in Apache FlinkDataWorks Summit
 
How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...DataWorks Summit/Hadoop Summit
 
Square Engineering's "Fail Fast, Retry Soon" Performance Optimization Technique
Square Engineering's "Fail Fast, Retry Soon" Performance Optimization TechniqueSquare Engineering's "Fail Fast, Retry Soon" Performance Optimization Technique
Square Engineering's "Fail Fast, Retry Soon" Performance Optimization TechniqueScyllaDB
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDatabricks
 
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon
 
Hudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilitiesHudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilitiesNishith Agarwal
 
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxData
 
Parquet performance tuning: the missing guide
Parquet performance tuning: the missing guideParquet performance tuning: the missing guide
Parquet performance tuning: the missing guideRyan Blue
 
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...Spark Summit
 
Hive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep DiveHive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep DiveDataWorks Summit
 
Apache Hadoop Security - Ranger
Apache Hadoop Security - RangerApache Hadoop Security - Ranger
Apache Hadoop Security - RangerIsheeta Sanghi
 
Introduction to Storm
Introduction to Storm Introduction to Storm
Introduction to Storm Chandler Huang
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and BenchmarksJignesh Shah
 
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...Michael Stack
 
How to size up an Apache Cassandra cluster (Training)
How to size up an Apache Cassandra cluster (Training)How to size up an Apache Cassandra cluster (Training)
How to size up an Apache Cassandra cluster (Training)DataStax Academy
 

Was ist angesagt? (20)

Presto overview
Presto overviewPresto overview
Presto overview
 
ORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big DataORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big Data
 
How We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IOHow We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IO
 
What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?
 
Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2
 
Bootstrapping state in Apache Flink
Bootstrapping state in Apache FlinkBootstrapping state in Apache Flink
Bootstrapping state in Apache Flink
 
How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...
 
Square Engineering's "Fail Fast, Retry Soon" Performance Optimization Technique
Square Engineering's "Fail Fast, Retry Soon" Performance Optimization TechniqueSquare Engineering's "Fail Fast, Retry Soon" Performance Optimization Technique
Square Engineering's "Fail Fast, Retry Soon" Performance Optimization Technique
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache Spark
 
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
 
Hudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilitiesHudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilities
 
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
 
Parquet performance tuning: the missing guide
Parquet performance tuning: the missing guideParquet performance tuning: the missing guide
Parquet performance tuning: the missing guide
 
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
Spark as a Platform to Support Multi-Tenancy and Many Kinds of Data Applicati...
 
Hive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep DiveHive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep Dive
 
Apache Hadoop Security - Ranger
Apache Hadoop Security - RangerApache Hadoop Security - Ranger
Apache Hadoop Security - Ranger
 
Introduction to Storm
Introduction to Storm Introduction to Storm
Introduction to Storm
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and Benchmarks
 
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
hbaseconasia2019 HBCK2: Concepts, trends, and recipes for fixing issues in HB...
 
How to size up an Apache Cassandra cluster (Training)
How to size up an Apache Cassandra cluster (Training)How to size up an Apache Cassandra cluster (Training)
How to size up an Apache Cassandra cluster (Training)
 

Ähnlich wie Apache Ratis - In Search of a Usable Raft Library

HDFS- What is New and Future
HDFS- What is New and FutureHDFS- What is New and Future
HDFS- What is New and FutureDataWorks Summit
 
Scaling HDFS to Manage Billions of Files with Distributed Storage Schemes
Scaling HDFS to Manage Billions of Files with Distributed Storage SchemesScaling HDFS to Manage Billions of Files with Distributed Storage Schemes
Scaling HDFS to Manage Billions of Files with Distributed Storage SchemesDataWorks Summit
 
Mapreduce over snapshots
Mapreduce over snapshotsMapreduce over snapshots
Mapreduce over snapshotsenissoz
 
Democratizing Memory Storage
Democratizing Memory StorageDemocratizing Memory Storage
Democratizing Memory StorageDataWorks Summit
 
Hadoop operations-2014-strata-new-york-v5
Hadoop operations-2014-strata-new-york-v5Hadoop operations-2014-strata-new-york-v5
Hadoop operations-2014-strata-new-york-v5Chris Nauroth
 
February 2014 HUG : Tez Details and Insides
February 2014 HUG : Tez Details and InsidesFebruary 2014 HUG : Tez Details and Insides
February 2014 HUG : Tez Details and InsidesYahoo Developer Network
 
La big datacamp2014_vikram_dixit
La big datacamp2014_vikram_dixitLa big datacamp2014_vikram_dixit
La big datacamp2014_vikram_dixitData Con LA
 
Design Choices for Cloud Data Platforms
Design Choices for Cloud Data PlatformsDesign Choices for Cloud Data Platforms
Design Choices for Cloud Data PlatformsAshish Mrig
 
Apache Tez - A unifying Framework for Hadoop Data Processing
Apache Tez - A unifying Framework for Hadoop Data ProcessingApache Tez - A unifying Framework for Hadoop Data Processing
Apache Tez - A unifying Framework for Hadoop Data ProcessingDataWorks Summit
 
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...Data Con LA
 
Big Data Conference April 2015
Big Data Conference April 2015Big Data Conference April 2015
Big Data Conference April 2015Aaron Benz
 
Hadoop Summit Europe 2015 - YARN Present and Future
Hadoop Summit Europe 2015 - YARN Present and FutureHadoop Summit Europe 2015 - YARN Present and Future
Hadoop Summit Europe 2015 - YARN Present and FutureVinod Kumar Vavilapalli
 
Apache Hadoop YARN 2015: Present and Future
Apache Hadoop YARN 2015: Present and FutureApache Hadoop YARN 2015: Present and Future
Apache Hadoop YARN 2015: Present and FutureDataWorks Summit
 
SQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for ImpalaSQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for Impalamarkgrover
 
Apache Hadoop YARN: best practices
Apache Hadoop YARN: best practicesApache Hadoop YARN: best practices
Apache Hadoop YARN: best practicesDataWorks Summit
 
Big data processing engines, Atlanta Meetup 4/30
Big data processing engines, Atlanta Meetup 4/30Big data processing engines, Atlanta Meetup 4/30
Big data processing engines, Atlanta Meetup 4/30Ashish Narasimham
 
YARN Ready: Integrating to YARN with Tez
YARN Ready: Integrating to YARN with Tez YARN Ready: Integrating to YARN with Tez
YARN Ready: Integrating to YARN with Tez Hortonworks
 
Apache Hadoop YARN - The Future of Data Processing with Hadoop
Apache Hadoop YARN - The Future of Data Processing with HadoopApache Hadoop YARN - The Future of Data Processing with Hadoop
Apache Hadoop YARN - The Future of Data Processing with HadoopHortonworks
 
What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?DataWorks Summit
 

Ähnlich wie Apache Ratis - In Search of a Usable Raft Library (20)

HDFS- What is New and Future
HDFS- What is New and FutureHDFS- What is New and Future
HDFS- What is New and Future
 
Scaling HDFS to Manage Billions of Files with Distributed Storage Schemes
Scaling HDFS to Manage Billions of Files with Distributed Storage SchemesScaling HDFS to Manage Billions of Files with Distributed Storage Schemes
Scaling HDFS to Manage Billions of Files with Distributed Storage Schemes
 
Mapreduce over snapshots
Mapreduce over snapshotsMapreduce over snapshots
Mapreduce over snapshots
 
Democratizing Memory Storage
Democratizing Memory StorageDemocratizing Memory Storage
Democratizing Memory Storage
 
Hadoop operations-2014-strata-new-york-v5
Hadoop operations-2014-strata-new-york-v5Hadoop operations-2014-strata-new-york-v5
Hadoop operations-2014-strata-new-york-v5
 
Containers and Big Data
Containers and Big Data Containers and Big Data
Containers and Big Data
 
February 2014 HUG : Tez Details and Insides
February 2014 HUG : Tez Details and InsidesFebruary 2014 HUG : Tez Details and Insides
February 2014 HUG : Tez Details and Insides
 
La big datacamp2014_vikram_dixit
La big datacamp2014_vikram_dixitLa big datacamp2014_vikram_dixit
La big datacamp2014_vikram_dixit
 
Design Choices for Cloud Data Platforms
Design Choices for Cloud Data PlatformsDesign Choices for Cloud Data Platforms
Design Choices for Cloud Data Platforms
 
Apache Tez - A unifying Framework for Hadoop Data Processing
Apache Tez - A unifying Framework for Hadoop Data ProcessingApache Tez - A unifying Framework for Hadoop Data Processing
Apache Tez - A unifying Framework for Hadoop Data Processing
 
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...
 
Big Data Conference April 2015
Big Data Conference April 2015Big Data Conference April 2015
Big Data Conference April 2015
 
Hadoop Summit Europe 2015 - YARN Present and Future
Hadoop Summit Europe 2015 - YARN Present and FutureHadoop Summit Europe 2015 - YARN Present and Future
Hadoop Summit Europe 2015 - YARN Present and Future
 
Apache Hadoop YARN 2015: Present and Future
Apache Hadoop YARN 2015: Present and FutureApache Hadoop YARN 2015: Present and Future
Apache Hadoop YARN 2015: Present and Future
 
SQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for ImpalaSQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for Impala
 
Apache Hadoop YARN: best practices
Apache Hadoop YARN: best practicesApache Hadoop YARN: best practices
Apache Hadoop YARN: best practices
 
Big data processing engines, Atlanta Meetup 4/30
Big data processing engines, Atlanta Meetup 4/30Big data processing engines, Atlanta Meetup 4/30
Big data processing engines, Atlanta Meetup 4/30
 
YARN Ready: Integrating to YARN with Tez
YARN Ready: Integrating to YARN with Tez YARN Ready: Integrating to YARN with Tez
YARN Ready: Integrating to YARN with Tez
 
Apache Hadoop YARN - The Future of Data Processing with Hadoop
Apache Hadoop YARN - The Future of Data Processing with HadoopApache Hadoop YARN - The Future of Data Processing with Hadoop
Apache Hadoop YARN - The Future of Data Processing with Hadoop
 
What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?
 

Kürzlich hochgeladen

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Kürzlich hochgeladen (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Apache Ratis - In Search of a Usable Raft Library

  • 1. © Hortonworks Inc. 2017 Apache Ratis In Search of a Usable Raft Library Tsz-Wo Nicholas Sze 11/15/2017 Brown Bag Lunch Talk Page 1
  • 2. © Hortonworks Inc. 2017 About Me • Tsz-Wo Nicholas Sze, Ph.D. – Software Engineer at Hortonworks – PMC member/Committer of Apache Hadoop – Active contributor and committer of Apache Ratis – Ph.D. from University of Maryland, College Park – MPhil & BEng from Hong Kong University of Sci & Tech Page 2 Architecting the Future of Big Data
  • 3. © Hortonworks Inc. 2017 Agenda • A brief introduction of RAFT • Apache Ratis – Features and use cases – Demo • Project Status – Current development – Future works Page 3 Architecting the Future of Big Data
  • 4. © Hortonworks Inc. 2017 Consensus • What is consensus? – Multiple servers to agree a value • Typical use cases – Log replication – Replicated state machines Page 4 Architecting the Future of Big Data
  • 5. © Hortonworks Inc. 2017 Consensus Algorithms • Paxos (1990) – Work but hard to understand – Hard to implement (correctly) • Raft (2014) • “In Search of an Understandable Consensus Algorithm” – by Diego Ongaro and John Ousterhout – USENIX ATC’14, https://raft.github.io • Motivations – Easy to understand – Easy to prove – Easy to implement Page 5 Architecting the Future of Big Data
  • 6. © Hortonworks Inc. 2017 Raft Basic • Leader Election – Servers are started as a Follower – Randomly timeout to become Candidate and start a leader election • Candidate sends requestVote to other servers – It becomes the leader once it gets a majority of the votes. • Append Entries – Clients send requests to the Leader – Leader forwards the requests to the Followers • Leader sends appendEntries to Followers – When there is no client requests, Leader also sends empty appendEntries to Followers to maintain leadership Page 6 Architecting the Future of Big Data
  • 7. © Hortonworks Inc. 2017 Raft Library • Our Motations – Use Raft in Ozone • “In Search of a Usable Raft Library” – A long list of Raft implementations is available – None of them a general library ready to be consumed by other projects. – Most of them are tied to another project or a part of another project. • We need a Raft library! Page 7 Architecting the Future of Big Data
  • 8. © Hortonworks Inc. 2017 Apache Ratis – A Raft Library • A brand new, incubating Apache project – Open source, open development – Apache License 2.0 – Written in Java 8 • Contributions are welcome! Page 8 Architecting the Future of Big Data
  • 9. © Hortonworks Inc. 2017 Ratis: Standard Raft Features • Leader Election + Log Replication – Automatically elect a leader among the servers in a Raft group – Randomized timeout for avoiding split votes – Log is replicated in the Raft group • Membership Changes – Members in a Raft group can be re-configurated in runtime – Replication factor can be changed in runtime • Log Compaction – Snapshot is taken periodically – Send snapshot instead of a long log history. Page 9 Architecting the Future of Big Data
  • 10. © Hortonworks Inc. 2017 Ratis: Pluggability • Pluggable state machine – Application must define its state machine – Example: a key-value map • Pluggable RPC – Users may provide their own RPC implementation – Default implementations: gRPC, Netty, Hadoop RPC • Pluggable Raft log – Users may provide their own log implementation – The default implementation stores log in local files Page 10 Architecting the Future of Big Data
  • 11. © Hortonworks Inc. 2017 Data Intensive Applications • In Raft, – All transactions and the data are written in the log – Not suitable for data intensive applications • In Ratis – Application could choose to not written all the data to log – State machine data and log data can be separately managed – See the FileStore example in ratis-example Page 11 Architecting the Future of Big Data
  • 12. © Hortonworks Inc. 2017 Ratis: Asynchronous APIs • Using gRPC bi-directional stream API – Netty and Hadoop RPC can support async but not yet implementated • Server-to-server – Asynchronous append entires • Client-to-server – Asynchronous client requests – RATIS-113: just committed yesterday (11/14/2017) – Need to fix out-of-order issues RATIS-140 and RATIS-141 Page 12 Architecting the Future of Big Data
  • 13. © Hortonworks Inc. 2017 General Ratis Use Cases • You already have a service running on a single server. • You want to: – (1) replicate the server log/states to multiple machines • The replication number/cluster membership can be changed in runtime • It can tolerate server failures. • or – (2) have a HA (highly available) service • When a server fails, another server will automatically take over. • Clients automatically failover to the new server. • Apache Ratis is for you! Page 13 Architecting the Future of Big Data
  • 14. © Hortonworks Inc. 2017 Ozone/HDFS Use Cases • Replicating open containers – HDFS-11519 • Ozone: Implement XceiverServerSpi and XceiverClientSpi using Ratis • Committed on 4/3/2017 • Support HA in SCM – HDFS-11443 • Ozone: Support SCM multiple instances for HA • Replacing the current Namenode HA solution – No JIRA yet Page 14 Architecting the Future of Big Data
  • 15. © Hortonworks Inc. 2017 Example: ArithmeticStateMachine • Maintain a variable map (variable -> value) – Users define the variables and expresions – Then, submit assignment messages Page 15 Architecting the Future of Big Data
  • 16. © Hortonworks Inc. 2017 Demo: ArithmeticStateMachine • Pythagorean – Put a = 3 and b = 4 – Find c • Special thanks to Marton Elek for working on RATIS-95 (CLI to run examples) so that this demo is possible! Page 16 Architecting the Future of Big Data
  • 17. © Hortonworks Inc. 2017 Gauss-Legendre • A.k.a the arithmetic–geometric mean method • A fast algorithm to compute pi Page 17 Architecting the Future of Big Data
  • 18. © Hortonworks Inc. 2017 Example: FileStore (RATIS-122) • Maintain a file map (key -> file) • Support only – Read, Write, Delete • But not other operations such as – List, Rename, etc. • Asynchronous & In-order – Client may submit multiple write requests to • Write to multiple files at the same time • Each file may have multiple write requests • File data is managed by the state machine – But not store in the raft log Page 18 Architecting the Future of Big Data
  • 19. © Hortonworks Inc. 2017 Ratis: Development Status • A brief history – 2016-03: Project started at Hortonworks – 2016-04: First commit “leader election (without tests)” – 2017-01: Entered Apache incubation. – 2017-03: Started preparing the first Alpha release (RATIS-53). – 2017-04: Hadoop Ozone branch started using Ratis (HDFS-11519)! – 2017-05: First Release 0.1.0-alpha – 2017-11: Preparing the second Release 0.2.0-alpha Page 19 Architecting the Future of Big Data
  • 20. © Hortonworks Inc. 2017 Work in Progress • Multi-Raft – General idea: Allow a server to join multiple Raft groups (RATIS-91) • When the #groups is large, it is hard to manage the logs • May assume SSD for log storage – Short term goal: Allow a server to join a small number of groups • “Small” means 2 or 3 • Use a small number of pre-configurated storage locations • Big benefit: servers could transition from one group to another group • Replicated Map (RATIS-40) – A sorted map similar to ZooKeeper/etcd/LogCabin – Intended to be used in production Page 20 Architecting the Future of Big Data
  • 21. © Hortonworks Inc. 2017 Ratis: Future Works • Performance – Fix gRPC async bugs: RATIS-140 and RATIS-141 – Use FileStore as benchmarks • Metrics • Security • API Specification • Documentations – Project web site • Jerkins Builds – Checkstyle configuration Page 21 Architecting the Future of Big Data
  • 22. © Hortonworks Inc. 2017 Contributors – Animesh Trivedi, Anu Engineer, Arpit Agarwal, Brent, – Chen Liang, Chris Nauroth, Devaraj Das, Enis Soztutar, – garvit, Hanisha Koneru, Hugo Louro, Jakob Homan, – Jian He, Jing Chen, Jing Zhao, Jitendra Pandey, Junping Du, – kaiyangzhang, Karl Heinz Marbaise, Li Lu, Lokesh Jain, – Marton Elek, Mayank Bansal, Mingliang Liu, – Mukul Kumar Singh, Sen Zhang, Sriharsha Chintalapani, – Tsz Wo Nicholas Sze, Uma Maheswara Rao G, – Venkat Ranganathan, Wangda Tan, Weiqing Yang, – Will Xu, Xiaobing Zhou, Xiaoyu Yao, Yubo Xu, yue liu, – Zhiyuan Yang Page 22 Architecting the Future of Big Data
  • 23. © Hortonworks Inc. 2017 Thank you! Contributions are welcome! • http://incubator.apache.org/projects/ratis.html • dev@ratis.incubator.apache.org Java question: What is <?> in above? ! Architecting the Future of Big Data Page 23