SlideShare a Scribd company logo
1 of 16
Apache Apex Meetup
Building YARN Application
Priyanka Gugale
January 06, 2016
Apache Apex Meetup
Agenda
● Understanding YARN
○ Why YARN
○ Introducing YARN
○ YARN architecture
○ Beyond batch
○ Application Lifecycle
● Building YARN application
Apache Apex Meetup
Why YARN
Hadoop v1 (MR1) Architecture
● Job Tracker
○ Manages cluster resources
○ Job scheduling
● Task Tracker
○ Per-node Agent
○ Manages tasks
MapReduce Status
Job Submission
Job
Tracker
Task Task
Task Task
Client
Client
Task
Tracker
Task Task
Task
Tracker
Task
Tracker
Apache Apex Meetup
Limitations with MR1
• Scalability
o Maximum cluster size: 4,000 nodes
o Maximum concurrent tasks: 40,000
• Availability
• Resource Utilization
• Running non-MapReduce applications
Why YARN (Cont…)
Apache Apex Meetup
Introducing YARN
● YARN - Yet Another Resource Negotiator
● Framework that facilitates writing arbitrary distributed processing
frameworks and applications.
● YARN Applications/frameworks:
e.g. MapReduce2, Apache Spark, Apache Giraph, Apache Apex etc.
Apache Apex Meetup
Hadoop beyond Batch
YARN for better
resource utilization
More applications
than MapReduce
Apache Apex Meetup
Introducing YARN
≈
7Proprietary and Confidential
Job Tracker
Resource Manager
Application Master
Timeline Server
Task Tracker Node Manager
Map Slot
Reduce Slot
≈
≈
YARNMap Reduce 1
≈
Apache Apex Meetup
• Resource Manager
o Manages and allocates cluster resources
o Application scheduling
o Applications Manager
• Node Manager
o Per-machine agent
o Manages life-cycle of container
o Monitors resources
• Application Master
o Per-application
o Manages application scheduling and task execution
Hadoop v2 (YARN) Architecture
App
Master
Cntr
Node
Manager
Cntr Cntr
Node
Manager
Cntr
App
Master
Node
Manager
Resource
Manager
MapReduce Status
Job Submission
Node Status
Resource Request
Client
Client
Apache Apex Meetup
Application Submission workflow
YarnClient
Node RM
(ApplicationsManagers +
Scheduler)
Node NM Node NM
Application
Master
ContainerContainer
1) Submit application
2) Launch application Master
RM = Resource Manager
NM = Node Manager
AM = Application Master
= Heartbeats
3) AM registers with RM
4) AM negotiates for containers
5) Launch Container
5) Launch
Container
Apache Apex Meetup
Building YARN application
Apache Apex Meetup
Sample YARN application - Client
1. Start the service - YarnClient
- YarnClient.start()
2. Create Application object - YarnClientApplication
- YarnClient.createApplication()
3. Set up App Context - ApplicationSubmissionContext
- ApplicationSubmissionContext represents information needed by
ResourceManager to launch ApplicationMaster
4. Submit application to resource manager
- YarnClient.submitApplication(ApplicationSubmissionContext)
11Proprietary and Confidential
AppName,
Priority,
ContainerLaunchContext,
…
Apache Apex Meetup
Sample YARN Application - App Master
1. Register App Master with Resource Manager
- AMRMClient.registerApplicationMaster
2. Negotiate containers from resource manager
- Provides ContainerRequest - request for container resources
- AMRMClient.addContainerRequest
3. Build ContainerLaunchContext
- Uses container returned by Resource Manager
- ContainerLaunchContext - represents information needed by node manager to
launch a container
12Proprietary and Confidential
ContainerId,
Commands,
Environment,
LocalResources,
…
Apache Apex Meetup
Sample YARN Application - App Master (cont…)
4. Launch container using NMClient.startContainer
5. Wait till all containers are done
- AllocateResponse.getCompletedContainersStatuses
6. Unregister application from Resource Manager
- AMRMClient.unregisterApplicationMaster
13Proprietary and Confidential
Apache Apex Meetup
References
● Simple Yarn code example
○ https://github.com/hortonworks/simple-yarn-app
● Document references
○ https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.html
○ http://hortonworks.com/blog/apache-hadoop-yarn-concepts-and-applications/
○ http://www.slideshare.net/
Apache Apex Meetup
Resources
15
Apache Apex Community Page
Apache Apex LinkedIn Group
Apache Apex Meetup
16Proprietary and Confidential
priyag@apache.org
priyanka@datatorrent.com

More Related Content

What's hot

Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...
Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...
Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...
Spark Summit
 

What's hot (20)

OpenStack Ceilometer
OpenStack CeilometerOpenStack Ceilometer
OpenStack Ceilometer
 
Spark Summit EU talk by Rolf Jagerman
Spark Summit EU talk by Rolf JagermanSpark Summit EU talk by Rolf Jagerman
Spark Summit EU talk by Rolf Jagerman
 
Ceilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdfCeilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdf
 
Analyzing Mixpanel Data into Amazon Redshift
Analyzing Mixpanel Data into Amazon RedshiftAnalyzing Mixpanel Data into Amazon Redshift
Analyzing Mixpanel Data into Amazon Redshift
 
Uber Business Metrics Generation and Management Through Apache Flink
Uber Business Metrics Generation and Management Through Apache FlinkUber Business Metrics Generation and Management Through Apache Flink
Uber Business Metrics Generation and Management Through Apache Flink
 
Spark Summit EU talk by Luc Bourlier
Spark Summit EU talk by Luc BourlierSpark Summit EU talk by Luc Bourlier
Spark Summit EU talk by Luc Bourlier
 
Spark Summit EU talk by Reza Karimi
Spark Summit EU talk by Reza KarimiSpark Summit EU talk by Reza Karimi
Spark Summit EU talk by Reza Karimi
 
Spark Summit EU talk by Mikhail Semeniuk Hollin Wilkins
Spark Summit EU talk by Mikhail Semeniuk Hollin WilkinsSpark Summit EU talk by Mikhail Semeniuk Hollin Wilkins
Spark Summit EU talk by Mikhail Semeniuk Hollin Wilkins
 
Presto @ Netflix: Interactive Queries at Petabyte Scale
Presto @ Netflix: Interactive Queries at Petabyte ScalePresto @ Netflix: Interactive Queries at Petabyte Scale
Presto @ Netflix: Interactive Queries at Petabyte Scale
 
Migrating PostgreSQL to the Cloud
Migrating PostgreSQL to the CloudMigrating PostgreSQL to the Cloud
Migrating PostgreSQL to the Cloud
 
Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...
Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...
Relationship Extraction from Unstructured Text-Based on Stanford NLP with Spa...
 
Spark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod NarasimhaSpark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod Narasimha
 
Ambari metrics system - Apache ambari meetup (DataWorks Summit 2017)
Ambari metrics system - Apache ambari meetup (DataWorks Summit 2017)Ambari metrics system - Apache ambari meetup (DataWorks Summit 2017)
Ambari metrics system - Apache ambari meetup (DataWorks Summit 2017)
 
Dataflow in 104corp - DataConTW2018
Dataflow in 104corp - DataConTW2018Dataflow in 104corp - DataConTW2018
Dataflow in 104corp - DataConTW2018
 
(BDT403) Netflix's Next Generation Big Data Platform | AWS re:Invent 2014
(BDT403) Netflix's Next Generation Big Data Platform | AWS re:Invent 2014(BDT403) Netflix's Next Generation Big Data Platform | AWS re:Invent 2014
(BDT403) Netflix's Next Generation Big Data Platform | AWS re:Invent 2014
 
(ADV402) Beating the Speed of Light with Your Infrastructure in AWS | AWS re:...
(ADV402) Beating the Speed of Light with Your Infrastructure in AWS | AWS re:...(ADV402) Beating the Speed of Light with Your Infrastructure in AWS | AWS re:...
(ADV402) Beating the Speed of Light with Your Infrastructure in AWS | AWS re:...
 
Parallelizing with Apache Spark in Unexpected Ways
Parallelizing with Apache Spark in Unexpected WaysParallelizing with Apache Spark in Unexpected Ways
Parallelizing with Apache Spark in Unexpected Ways
 
SparkR + Zeppelin
SparkR + ZeppelinSparkR + Zeppelin
SparkR + Zeppelin
 
Ceilosca
CeiloscaCeilosca
Ceilosca
 
Ceilometer + Heat = Alarming
Ceilometer + Heat = Alarming Ceilometer + Heat = Alarming
Ceilometer + Heat = Alarming
 

Similar to Understanding yarn - Pune apex meetup jan 06 2016

Developing YARN Applications - Integrating natively to YARN July 24 2014
Developing YARN Applications - Integrating natively to YARN July 24 2014Developing YARN Applications - Integrating natively to YARN July 24 2014
Developing YARN Applications - Integrating natively to YARN July 24 2014
Hortonworks
 
Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...
Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...
Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...
Simplilearn
 
Bikas saha:the next generation of hadoop– hadoop 2 and yarn
Bikas saha:the next generation of hadoop– hadoop 2 and yarnBikas saha:the next generation of hadoop– hadoop 2 and yarn
Bikas saha:the next generation of hadoop– hadoop 2 and yarn
hdhappy001
 

Similar to Understanding yarn - Pune apex meetup jan 06 2016 (20)

Introduction to yarn
Introduction to yarnIntroduction to yarn
Introduction to yarn
 
Introduction to Yarn
Introduction to YarnIntroduction to Yarn
Introduction to Yarn
 
ApacheCon North America 2014 - Apache Hadoop YARN: The Next-generation Distri...
ApacheCon North America 2014 - Apache Hadoop YARN: The Next-generation Distri...ApacheCon North America 2014 - Apache Hadoop YARN: The Next-generation Distri...
ApacheCon North America 2014 - Apache Hadoop YARN: The Next-generation Distri...
 
YARN - way to share cluster BEYOND HADOOP
YARN - way to share cluster BEYOND HADOOPYARN - way to share cluster BEYOND HADOOP
YARN - way to share cluster BEYOND HADOOP
 
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
Intro to YARN (Hadoop 2.0) & Apex as YARN App (Next Gen Big Data)
 
Developing YARN Applications - Integrating natively to YARN July 24 2014
Developing YARN Applications - Integrating natively to YARN July 24 2014Developing YARN Applications - Integrating natively to YARN July 24 2014
Developing YARN Applications - Integrating natively to YARN July 24 2014
 
Spark on yarn
Spark on yarnSpark on yarn
Spark on yarn
 
Running Non-MapReduce Big Data Applications on Apache Hadoop
Running Non-MapReduce Big Data Applications on Apache HadoopRunning Non-MapReduce Big Data Applications on Apache Hadoop
Running Non-MapReduce Big Data Applications on Apache Hadoop
 
Venturing into Hadoop Large Clusters
Venturing into Hadoop Large ClustersVenturing into Hadoop Large Clusters
Venturing into Hadoop Large Clusters
 
Venturing into Large Hadoop Clusters
Venturing into Large Hadoop ClustersVenturing into Large Hadoop Clusters
Venturing into Large Hadoop Clusters
 
Developing Applications with Hadoop 2.0 and YARN by Abhijit Lele
Developing Applications with Hadoop 2.0 and YARN by Abhijit Lele Developing Applications with Hadoop 2.0 and YARN by Abhijit Lele
Developing Applications with Hadoop 2.0 and YARN by Abhijit Lele
 
Hadoop 2.0 YARN webinar
Hadoop 2.0 YARN webinar Hadoop 2.0 YARN webinar
Hadoop 2.0 YARN webinar
 
Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...
Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...
Hadoop YARN | Hadoop YARN Architecture | Hadoop YARN Tutorial | Hadoop Tutori...
 
Venturing into Large Hadoop Clusters
Venturing into Large Hadoop ClustersVenturing into Large Hadoop Clusters
Venturing into Large Hadoop Clusters
 
Apache Apex as a YARN Apllication
Apache Apex as a YARN ApllicationApache Apex as a YARN Apllication
Apache Apex as a YARN Apllication
 
Apex as yarn application
Apex as yarn applicationApex as yarn application
Apex as yarn application
 
Bikas saha:the next generation of hadoop– hadoop 2 and yarn
Bikas saha:the next generation of hadoop– hadoop 2 and yarnBikas saha:the next generation of hadoop– hadoop 2 and yarn
Bikas saha:the next generation of hadoop– hadoop 2 and yarn
 
YARN - Hadoop Next Generation Compute Platform
YARN - Hadoop Next Generation Compute PlatformYARN - Hadoop Next Generation Compute Platform
YARN - Hadoop Next Generation Compute Platform
 
Apache Hadoop YARN: Understanding the Data Operating System of Hadoop
Apache Hadoop YARN: Understanding the Data Operating System of HadoopApache Hadoop YARN: Understanding the Data Operating System of Hadoop
Apache Hadoop YARN: Understanding the Data Operating System of Hadoop
 
Spark & Yarn better together 1.2
Spark & Yarn better together 1.2Spark & Yarn better together 1.2
Spark & Yarn better together 1.2
 

Recently uploaded

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 

Understanding yarn - Pune apex meetup jan 06 2016

  • 1. Apache Apex Meetup Building YARN Application Priyanka Gugale January 06, 2016
  • 2. Apache Apex Meetup Agenda ● Understanding YARN ○ Why YARN ○ Introducing YARN ○ YARN architecture ○ Beyond batch ○ Application Lifecycle ● Building YARN application
  • 3. Apache Apex Meetup Why YARN Hadoop v1 (MR1) Architecture ● Job Tracker ○ Manages cluster resources ○ Job scheduling ● Task Tracker ○ Per-node Agent ○ Manages tasks MapReduce Status Job Submission Job Tracker Task Task Task Task Client Client Task Tracker Task Task Task Tracker Task Tracker
  • 4. Apache Apex Meetup Limitations with MR1 • Scalability o Maximum cluster size: 4,000 nodes o Maximum concurrent tasks: 40,000 • Availability • Resource Utilization • Running non-MapReduce applications Why YARN (Cont…)
  • 5. Apache Apex Meetup Introducing YARN ● YARN - Yet Another Resource Negotiator ● Framework that facilitates writing arbitrary distributed processing frameworks and applications. ● YARN Applications/frameworks: e.g. MapReduce2, Apache Spark, Apache Giraph, Apache Apex etc.
  • 6. Apache Apex Meetup Hadoop beyond Batch YARN for better resource utilization More applications than MapReduce
  • 7. Apache Apex Meetup Introducing YARN ≈ 7Proprietary and Confidential Job Tracker Resource Manager Application Master Timeline Server Task Tracker Node Manager Map Slot Reduce Slot ≈ ≈ YARNMap Reduce 1 ≈
  • 8. Apache Apex Meetup • Resource Manager o Manages and allocates cluster resources o Application scheduling o Applications Manager • Node Manager o Per-machine agent o Manages life-cycle of container o Monitors resources • Application Master o Per-application o Manages application scheduling and task execution Hadoop v2 (YARN) Architecture App Master Cntr Node Manager Cntr Cntr Node Manager Cntr App Master Node Manager Resource Manager MapReduce Status Job Submission Node Status Resource Request Client Client
  • 9. Apache Apex Meetup Application Submission workflow YarnClient Node RM (ApplicationsManagers + Scheduler) Node NM Node NM Application Master ContainerContainer 1) Submit application 2) Launch application Master RM = Resource Manager NM = Node Manager AM = Application Master = Heartbeats 3) AM registers with RM 4) AM negotiates for containers 5) Launch Container 5) Launch Container
  • 10. Apache Apex Meetup Building YARN application
  • 11. Apache Apex Meetup Sample YARN application - Client 1. Start the service - YarnClient - YarnClient.start() 2. Create Application object - YarnClientApplication - YarnClient.createApplication() 3. Set up App Context - ApplicationSubmissionContext - ApplicationSubmissionContext represents information needed by ResourceManager to launch ApplicationMaster 4. Submit application to resource manager - YarnClient.submitApplication(ApplicationSubmissionContext) 11Proprietary and Confidential AppName, Priority, ContainerLaunchContext, …
  • 12. Apache Apex Meetup Sample YARN Application - App Master 1. Register App Master with Resource Manager - AMRMClient.registerApplicationMaster 2. Negotiate containers from resource manager - Provides ContainerRequest - request for container resources - AMRMClient.addContainerRequest 3. Build ContainerLaunchContext - Uses container returned by Resource Manager - ContainerLaunchContext - represents information needed by node manager to launch a container 12Proprietary and Confidential ContainerId, Commands, Environment, LocalResources, …
  • 13. Apache Apex Meetup Sample YARN Application - App Master (cont…) 4. Launch container using NMClient.startContainer 5. Wait till all containers are done - AllocateResponse.getCompletedContainersStatuses 6. Unregister application from Resource Manager - AMRMClient.unregisterApplicationMaster 13Proprietary and Confidential
  • 14. Apache Apex Meetup References ● Simple Yarn code example ○ https://github.com/hortonworks/simple-yarn-app ● Document references ○ https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.html ○ http://hortonworks.com/blog/apache-hadoop-yarn-concepts-and-applications/ ○ http://www.slideshare.net/
  • 15. Apache Apex Meetup Resources 15 Apache Apex Community Page Apache Apex LinkedIn Group
  • 16. Apache Apex Meetup 16Proprietary and Confidential priyag@apache.org priyanka@datatorrent.com