SlideShare une entreprise Scribd logo
1  sur  34
© Hortonworks Inc. 2011
Hadoop YARNSF Hadoop Users Meetup
Vinod Kumar Vavilapalli
vinodkv [at] { apache dot org | hortonworks dot
com }
@tshooter
Page 1
© Hortonworks Inc. 2011
Myself
• 6.25 Hadoop-years old
• Previously at Yahoo!, @Hortonworks now.
• Last thing at college – a two node tomcat cluster. Three
months later, first thing at job, brought down a 800 node
cluster ;)
• Hadoop YARN lead. Apache Hadoop PMC, Apache
Member
• MapReduce, HadoopOnDemand, CapacityScheduler,
Hadoop security
• Ambari/Stinger/ random trouble shooting
2
© Hortonworks Inc. 2011
YARN: A new abstraction layer
HADOOP 1.0
HDFS
(redundant, reliable storage)
MapReduce
(cluster resource management
& data processing)
HDFS2
(redundant, reliable storage)
YARN
(cluster resource management)
MapReduce
(data processing)
Others
(data processing)
HADOOP 2.0
Single Use System
Batch Apps
Multi Purpose Platform
Batch, Interactive, Online, Streaming, …
Page 3
© Hortonworks Inc. 2011
Concepts
Page 4
HDFS
YARN
MRv2 Tez
Platform
Applications &
Frameworks
Job #1 Job #2Jobs
© Hortonworks Inc. 2011
Concepts
• Platform
• Framework
• Application
–Application is a job submitted to the framework
–Example – Map Reduce Job
• Container
–Basic unit of allocation
–Fine-grained resource allocation across multiple resource
types (memory, cpu, disk, network, gpu etc.)
– container_0 = 2GB, 1CPU
– container_1 = 1GB, 6 CPU
5
© Hortonworks Inc. 2011
Architecture
Architecting the Future of Big Data
Page 6
© Hortonworks Inc. 2011
Hadoop MapReduce Classic
• JobTracker
–Manages cluster resources and job scheduling
• TaskTracker
–Per-node agent
–Manage tasks
7
© Hortonworks Inc. 2011
Current Limitations
• Scalability
–Maximum Cluster size – 4,000 nodes
–Maximum concurrent tasks – 40,000
–Coarse synchronization in JobTracker
• Single point of failure
–Failure kills all queued and running jobs
–Jobs need to be re-submitted by users
• Restart is very tricky due to complex state
Page 8
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Current Limitations contd.
• Hard partition of resources into map and reduce slots
–Low resource utilization
• Lacks support for alternate paradigms
–Iterative applications implemented using MapReduce are
10x slower
–Hacks for the likes of MPI/Graph Processing
• Lack of wire-compatible protocols
–Client and cluster must be of same version
–Applications and workflows cannot migrate to different
clusters
Page 9
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Requirements
• Reliability
• Availability
• Utilization
• Wire Compatibility
• Agility & Evolution – Ability for customers to control
upgrades to the grid software stack.
• Scalability - Clusters of 6,000-10,000 machines
–Each machine with 16 cores, 48G/96G RAM, 24TB/36TB
disks
–100,000+ concurrent tasks
–10,000 concurrent jobs
Page 10
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Architecture: Philosophy
• General-purpose, distributed application framework
–Cannot scale monolithic masters. Or monsters?
–Distribute responsibilities
• ResourceManager – Central scheduler
–Only resource arbitration
–No failure handling
–Provide necessary information to AMs
• Push everything possible responsibility to ApplicationMaster(s)
–Don’t trust ApplicationMaster(s)
–User land library!
11
© Hortonworks Inc. 2011
Architecture
• Resource Manager
–Global resource scheduler
–Hierarchical queues
• Node Manager
–Per-machine agent
–Manages the life-cycle of container
–Container resource monitoring
• Application Master
–Per-application
–Manages application scheduling and task execution
–E.g. MapReduce Application Master
12
© Hortonworks Inc. 2011
YARN Architecture
Page 13
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Apache Hadoop MapReduce on YARN
Page 14
Architecting the Future of Big Data
NodeManager NodeManager NodeManager NodeManager
map 1.1
reduce2.1
ResourceManager
NodeManager NodeManager NodeManager NodeManager
NodeManager NodeManager NodeManager NodeManager
map1.2
reduce1.1
MR AM 1
map2.1
map2.2
reduce2.2
MR AM2
Scheduler
© Hortonworks Inc. 2011
Global Scheduler (ResourceManager)
• Resource arbitration
• Multiple resource dimensions
–<priority, data-locality, memory, cpu, …>
• In-built support for data-locality
–Node, Rack etc.
–Unique to YARN.
15
© Hortonworks Inc. 2011
Scheduler Concepts
• Input from AM(s) is a dynamic list of ResourceRequests
–<resource-name, resource-capability>
–Resource name: (hostname / rackname / any)
–Resource capability: (memory, cpu, …)
–Essentially an inverted <name, capability> request map from AM
to RM
–No notion of tasks!
• Output - Container
–Resource(s) grant on a specific machine
–Verifiable allocation: via Container Tokens
Page 16
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Fault tolerance
• Task/container failures
– Application Masters should take care, it’s their business
• Node failures
– ResourceManager marks the nodes as failed, informs all the apps / Application
Masters. AMs can chose to ignore failure or rerun work depending on what they
want.
• Application Master failures
– ResourceManager restarts AMs that have failed.
– One Application can have multiple ApplicationAttempts
– Every ApplicationAttempt should store state, so that next ApplicationAttempt can
recover from failure
• ResourceManager failures
– ResourceManager saves state, can do host/ip failover today.
– Recovers state, but kills all current work as of now
– Work preserving restart
– HA
Page 17
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Writing your own apps
Architecting the Future of Big Data
Page 18
© Hortonworks Inc. 2011
Application Master
• Dynamically allocated per-application on startup
• Responsible for individual application scheduling and life-
cycle management
• Request and obtain containers for it’s tasks
–Do a second-level schedule i.e. containers to component
tasks
–Start/stop containers on NodeManagers
• Handle all task/container errors
• Obtain resource hints/meta-information from RM for better
scheduling
–Peek-ahead into resource availability
–Faulty resources (node, rack etc.)
Page 19
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Writing Custom Applications
• Grand total of 3 protocols
• ApplicationClientProtocol
–Application launching program
–submitApplication
• ApplicationMasterProtocol
–Protocol between AM & RM for resource allocation
–registerApplication / allocate / finishApplication
• ContainerManagementProtocol
–Protocol between AM & NM for container start/stop
–startContainer / stopContainer
Page 20
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Other things to take care of
• Container/tasks
• Client
• UI
• Recovery
• Container -> AM communication
• Application History
Page 21
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Libraries for app/framework writers
• YarnClient, AMRMClient, NMClient
• More projects:
– Higher level APIs
– Weave, REEF
Page 22
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Other goodies
• Rolling upgrades
• Multiple versions of MR at the same time
• Same scheduling algorithms – Capacity, fairness
• Secure from start
• Locality for generic apps
• Log aggregation
• Everything on the same cluster
Page 23
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Existing applications
Architecting the Future of Big Data
Page 24
© Hortonworks Inc. 2011
Compatibility with Apache Hadoop 1.x
• org.apache.hadoop.mapred
– Add 1 property to your existing mapred-site.xml
– mapreduce.framework.name = yarn
– Continue submitting using bin/hadoop
– Nothing Else Just Run Your MapReduce Jobs!
• org.apache.hadoop.mapreduce
– Generally run without changes, recompilation, or minor updates
– If your existing apps fail recompile against the new MRv2 jars
• Pig
– Scripts built on Pig 10.1+ run without changes
• Hive
– Queries built on Hive 10.0+ run without changes
• Streaming, Pipes, Oozie, Sqoop ….
© Hortonworks Inc. 2011
Any Performance Gains?
• Significant gains across the board!
• MapReduce
–Lots of runtime improvements
–Map side, reduce side
–Better shuffle
• So much better throughput
• Y! can run lot more jobs on lesser number of nodes in
lesser time
More details: http://hortonworks.com/delivering-on-hadoop-next-benchmarking-performance/
Page 26
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Testing?
• Testing, *lots* of it
• Benchmarks: Blog post soon
• Integration testing/ full-stack
–HBase
–Pig
–Hive
–Oozie
–…
• Functional tests
Page 27
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Deployment
• Beta last month
–Misnomer: 10s of PB of storage, on 0.23, a previous state of
YARN before 2.0
–Significantly wide variety of applications and load
• GA
–Very soon, less than a month away
–Bugs, blockers only now
Page 28
Architecting the Future of Big Data
© Hortonworks Inc. 2011
How do I get it?
Architecting the Future of Big Data
Page 29
© Hortonworks Inc. 2011
YARN beta releases
• Apache Hadoop Core 2.1.0-Beta
– Official beta release from Apache
– YARN APIs are stable
– Backwards compatible with MapReduce 1 jobs
– Blocker bugs have been resolved
• Features in HDP 2.0 Beta
– Apache Ambari deploys YARN and Mapreduce 2
– Capacity Scheduler for YARN
– Full stack tested
Page 30
© Hortonworks Inc. 2011
Future
Architecting the Future of Big Data
Page 31
© Hortonworks Inc. 2011
Looking ahead
• YARN Improvements
• Alternate programming models: Apache Tez, Storm.
• Long(er) running services (e.g. Hbase): Hoya
• ResourceManager HA
• Work-preserving restart of resourcemanager
• Reconnect running containers to AMs
• Gang scheduling
• Multi-dimensional resources: CPU in. Disk (capacity,
IOPS), network?
Page 32
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Ecosystem
• Spark (UCB) on YARN
• Real-time data processing
–Storm (Twitter) on YARN
• Graph processing – Apache Giraph on YARN
• OpenMPI on YARN?
• PAAS on YARN?
• Yarnify: *. on YARN
Page 33
Architecting the Future of Big Data
© Hortonworks Inc. 2011
Questions & Answers
TRY
download at hortonworks.com
LEARN
Hortonworks University
FOLLOW
twitter: @hortonworks
Facebook: facebook.com/hortonworks
MORE EVENTS
hortonworks.com/events
Page 34
Further questions & comments: events@hortonworks.com

Contenu connexe

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

En vedette

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

September SF Hadoop User Group 2013

  • 1. © Hortonworks Inc. 2011 Hadoop YARNSF Hadoop Users Meetup Vinod Kumar Vavilapalli vinodkv [at] { apache dot org | hortonworks dot com } @tshooter Page 1
  • 2. © Hortonworks Inc. 2011 Myself • 6.25 Hadoop-years old • Previously at Yahoo!, @Hortonworks now. • Last thing at college – a two node tomcat cluster. Three months later, first thing at job, brought down a 800 node cluster ;) • Hadoop YARN lead. Apache Hadoop PMC, Apache Member • MapReduce, HadoopOnDemand, CapacityScheduler, Hadoop security • Ambari/Stinger/ random trouble shooting 2
  • 3. © Hortonworks Inc. 2011 YARN: A new abstraction layer HADOOP 1.0 HDFS (redundant, reliable storage) MapReduce (cluster resource management & data processing) HDFS2 (redundant, reliable storage) YARN (cluster resource management) MapReduce (data processing) Others (data processing) HADOOP 2.0 Single Use System Batch Apps Multi Purpose Platform Batch, Interactive, Online, Streaming, … Page 3
  • 4. © Hortonworks Inc. 2011 Concepts Page 4 HDFS YARN MRv2 Tez Platform Applications & Frameworks Job #1 Job #2Jobs
  • 5. © Hortonworks Inc. 2011 Concepts • Platform • Framework • Application –Application is a job submitted to the framework –Example – Map Reduce Job • Container –Basic unit of allocation –Fine-grained resource allocation across multiple resource types (memory, cpu, disk, network, gpu etc.) – container_0 = 2GB, 1CPU – container_1 = 1GB, 6 CPU 5
  • 6. © Hortonworks Inc. 2011 Architecture Architecting the Future of Big Data Page 6
  • 7. © Hortonworks Inc. 2011 Hadoop MapReduce Classic • JobTracker –Manages cluster resources and job scheduling • TaskTracker –Per-node agent –Manage tasks 7
  • 8. © Hortonworks Inc. 2011 Current Limitations • Scalability –Maximum Cluster size – 4,000 nodes –Maximum concurrent tasks – 40,000 –Coarse synchronization in JobTracker • Single point of failure –Failure kills all queued and running jobs –Jobs need to be re-submitted by users • Restart is very tricky due to complex state Page 8 Architecting the Future of Big Data
  • 9. © Hortonworks Inc. 2011 Current Limitations contd. • Hard partition of resources into map and reduce slots –Low resource utilization • Lacks support for alternate paradigms –Iterative applications implemented using MapReduce are 10x slower –Hacks for the likes of MPI/Graph Processing • Lack of wire-compatible protocols –Client and cluster must be of same version –Applications and workflows cannot migrate to different clusters Page 9 Architecting the Future of Big Data
  • 10. © Hortonworks Inc. 2011 Requirements • Reliability • Availability • Utilization • Wire Compatibility • Agility & Evolution – Ability for customers to control upgrades to the grid software stack. • Scalability - Clusters of 6,000-10,000 machines –Each machine with 16 cores, 48G/96G RAM, 24TB/36TB disks –100,000+ concurrent tasks –10,000 concurrent jobs Page 10 Architecting the Future of Big Data
  • 11. © Hortonworks Inc. 2011 Architecture: Philosophy • General-purpose, distributed application framework –Cannot scale monolithic masters. Or monsters? –Distribute responsibilities • ResourceManager – Central scheduler –Only resource arbitration –No failure handling –Provide necessary information to AMs • Push everything possible responsibility to ApplicationMaster(s) –Don’t trust ApplicationMaster(s) –User land library! 11
  • 12. © Hortonworks Inc. 2011 Architecture • Resource Manager –Global resource scheduler –Hierarchical queues • Node Manager –Per-machine agent –Manages the life-cycle of container –Container resource monitoring • Application Master –Per-application –Manages application scheduling and task execution –E.g. MapReduce Application Master 12
  • 13. © Hortonworks Inc. 2011 YARN Architecture Page 13 Architecting the Future of Big Data
  • 14. © Hortonworks Inc. 2011 Apache Hadoop MapReduce on YARN Page 14 Architecting the Future of Big Data NodeManager NodeManager NodeManager NodeManager map 1.1 reduce2.1 ResourceManager NodeManager NodeManager NodeManager NodeManager NodeManager NodeManager NodeManager NodeManager map1.2 reduce1.1 MR AM 1 map2.1 map2.2 reduce2.2 MR AM2 Scheduler
  • 15. © Hortonworks Inc. 2011 Global Scheduler (ResourceManager) • Resource arbitration • Multiple resource dimensions –<priority, data-locality, memory, cpu, …> • In-built support for data-locality –Node, Rack etc. –Unique to YARN. 15
  • 16. © Hortonworks Inc. 2011 Scheduler Concepts • Input from AM(s) is a dynamic list of ResourceRequests –<resource-name, resource-capability> –Resource name: (hostname / rackname / any) –Resource capability: (memory, cpu, …) –Essentially an inverted <name, capability> request map from AM to RM –No notion of tasks! • Output - Container –Resource(s) grant on a specific machine –Verifiable allocation: via Container Tokens Page 16 Architecting the Future of Big Data
  • 17. © Hortonworks Inc. 2011 Fault tolerance • Task/container failures – Application Masters should take care, it’s their business • Node failures – ResourceManager marks the nodes as failed, informs all the apps / Application Masters. AMs can chose to ignore failure or rerun work depending on what they want. • Application Master failures – ResourceManager restarts AMs that have failed. – One Application can have multiple ApplicationAttempts – Every ApplicationAttempt should store state, so that next ApplicationAttempt can recover from failure • ResourceManager failures – ResourceManager saves state, can do host/ip failover today. – Recovers state, but kills all current work as of now – Work preserving restart – HA Page 17 Architecting the Future of Big Data
  • 18. © Hortonworks Inc. 2011 Writing your own apps Architecting the Future of Big Data Page 18
  • 19. © Hortonworks Inc. 2011 Application Master • Dynamically allocated per-application on startup • Responsible for individual application scheduling and life- cycle management • Request and obtain containers for it’s tasks –Do a second-level schedule i.e. containers to component tasks –Start/stop containers on NodeManagers • Handle all task/container errors • Obtain resource hints/meta-information from RM for better scheduling –Peek-ahead into resource availability –Faulty resources (node, rack etc.) Page 19 Architecting the Future of Big Data
  • 20. © Hortonworks Inc. 2011 Writing Custom Applications • Grand total of 3 protocols • ApplicationClientProtocol –Application launching program –submitApplication • ApplicationMasterProtocol –Protocol between AM & RM for resource allocation –registerApplication / allocate / finishApplication • ContainerManagementProtocol –Protocol between AM & NM for container start/stop –startContainer / stopContainer Page 20 Architecting the Future of Big Data
  • 21. © Hortonworks Inc. 2011 Other things to take care of • Container/tasks • Client • UI • Recovery • Container -> AM communication • Application History Page 21 Architecting the Future of Big Data
  • 22. © Hortonworks Inc. 2011 Libraries for app/framework writers • YarnClient, AMRMClient, NMClient • More projects: – Higher level APIs – Weave, REEF Page 22 Architecting the Future of Big Data
  • 23. © Hortonworks Inc. 2011 Other goodies • Rolling upgrades • Multiple versions of MR at the same time • Same scheduling algorithms – Capacity, fairness • Secure from start • Locality for generic apps • Log aggregation • Everything on the same cluster Page 23 Architecting the Future of Big Data
  • 24. © Hortonworks Inc. 2011 Existing applications Architecting the Future of Big Data Page 24
  • 25. © Hortonworks Inc. 2011 Compatibility with Apache Hadoop 1.x • org.apache.hadoop.mapred – Add 1 property to your existing mapred-site.xml – mapreduce.framework.name = yarn – Continue submitting using bin/hadoop – Nothing Else Just Run Your MapReduce Jobs! • org.apache.hadoop.mapreduce – Generally run without changes, recompilation, or minor updates – If your existing apps fail recompile against the new MRv2 jars • Pig – Scripts built on Pig 10.1+ run without changes • Hive – Queries built on Hive 10.0+ run without changes • Streaming, Pipes, Oozie, Sqoop ….
  • 26. © Hortonworks Inc. 2011 Any Performance Gains? • Significant gains across the board! • MapReduce –Lots of runtime improvements –Map side, reduce side –Better shuffle • So much better throughput • Y! can run lot more jobs on lesser number of nodes in lesser time More details: http://hortonworks.com/delivering-on-hadoop-next-benchmarking-performance/ Page 26 Architecting the Future of Big Data
  • 27. © Hortonworks Inc. 2011 Testing? • Testing, *lots* of it • Benchmarks: Blog post soon • Integration testing/ full-stack –HBase –Pig –Hive –Oozie –… • Functional tests Page 27 Architecting the Future of Big Data
  • 28. © Hortonworks Inc. 2011 Deployment • Beta last month –Misnomer: 10s of PB of storage, on 0.23, a previous state of YARN before 2.0 –Significantly wide variety of applications and load • GA –Very soon, less than a month away –Bugs, blockers only now Page 28 Architecting the Future of Big Data
  • 29. © Hortonworks Inc. 2011 How do I get it? Architecting the Future of Big Data Page 29
  • 30. © Hortonworks Inc. 2011 YARN beta releases • Apache Hadoop Core 2.1.0-Beta – Official beta release from Apache – YARN APIs are stable – Backwards compatible with MapReduce 1 jobs – Blocker bugs have been resolved • Features in HDP 2.0 Beta – Apache Ambari deploys YARN and Mapreduce 2 – Capacity Scheduler for YARN – Full stack tested Page 30
  • 31. © Hortonworks Inc. 2011 Future Architecting the Future of Big Data Page 31
  • 32. © Hortonworks Inc. 2011 Looking ahead • YARN Improvements • Alternate programming models: Apache Tez, Storm. • Long(er) running services (e.g. Hbase): Hoya • ResourceManager HA • Work-preserving restart of resourcemanager • Reconnect running containers to AMs • Gang scheduling • Multi-dimensional resources: CPU in. Disk (capacity, IOPS), network? Page 32 Architecting the Future of Big Data
  • 33. © Hortonworks Inc. 2011 Ecosystem • Spark (UCB) on YARN • Real-time data processing –Storm (Twitter) on YARN • Graph processing – Apache Giraph on YARN • OpenMPI on YARN? • PAAS on YARN? • Yarnify: *. on YARN Page 33 Architecting the Future of Big Data
  • 34. © Hortonworks Inc. 2011 Questions & Answers TRY download at hortonworks.com LEARN Hortonworks University FOLLOW twitter: @hortonworks Facebook: facebook.com/hortonworks MORE EVENTS hortonworks.com/events Page 34 Further questions & comments: events@hortonworks.com