

{"id":418,"date":"2016-06-13T13:07:20","date_gmt":"2016-06-13T13:07:20","guid":{"rendered":"http:\/\/data-flair.training\/blogs\/?p=418"},"modified":"2021-05-19T18:24:25","modified_gmt":"2021-05-19T12:54:25","slug":"hadoop-yarn-node-manager-tutorial","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/","title":{"rendered":"Deep Dive into Hadoop YARN Node Manager &#8211; A Yarn Tutorial"},"content":{"rendered":"<p>In this <strong>Hadoop Yarn<\/strong> node manager tutorial, we will discuss node manager in Yarn, how it interact with the resource manager, how it allocates containers. We will also cover different Node manager components, how auxiliary services run\u00a0in the node manager?<\/p>\n<h2>Introduction to Hadoop Yarn Node Manager<\/h2>\n<p>Conceptually, the <b>NodeManag<\/b><strong>er<\/strong> is more of a generic and efficient version of <b>TaskTracker<\/b>\u00a0(of Hadoop1 architecture) which is more flexible than TaskTracker.<\/p>\n<p>In contrast to fixed number of slots for map and reduce tasks in MRV1, the NodeManager of MRV2 has a number of dynamically created <b>resource containers<\/b>. There is no hard code split available into Map and Reduce slots as in MRV1.<\/p>\n<p>The container refers to a collection of resources such as memory, CPU, disk and network IO. The number of containers on a node is the product of configuration parameter and the total amount of node resources. Node manager is the slave daemon of Yarn.<\/p>\n<div id=\"attachment_420\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-420\" class=\"wp-image-420 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager.jpg\" alt=\"Node Manager\" width=\"500\" height=\"375\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager.jpg 500w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-150x113.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><p id=\"caption-attachment-420\" class=\"wp-caption-text\">Hadoop yarn Node Manager<\/p><\/div>\n<p>The Hadoop Yarn Node Manager is the per-machine\/per-node framework agent who is responsible for containers, monitoring their resource usage and reporting the same to the <strong>ResourceManager<\/strong>.<\/p>\n<p>Overseeing container\u2019s lifecycle management, NodeManager also tracks the health of the node on which it is running, controls auxiliary services which different YARN applications may exploit at any point in time.<\/p>\n<p>NodeManager can execute any computations that make sense to <b>ApplicationMaster <\/b>just by creating the container for each task.The above architecture diagram gives a detailed view of the NodeManager components.<\/p>\n<p>The above architecture diagram gives a detailed view of the NodeManager components.<\/p>\n<h2>Yarn NodeManager Components<\/h2>\n<p>This section of Hadoop Yarn node manager tutorial will provide you a detailed description of yarn node manager components-<\/p>\n<h3>1. NodeStatusUpdater<\/h3>\n<p>On startup, this component registers with the ResourceManager(RM) and sends information about the resources available to every node. Subsequent NM-RM communication exchange updates on container statuses of every node like containers running on the node completed containers, etc.<\/p>\n<p>In addition, the RM may signal the<em> NodeStatusUpdater<\/em> to potentially kill already running containers.<\/p>\n<h3>2. Container Manager<\/h3>\n<p>Being the core component of the NodeManager, shoulder the responsibilities of managing the containers running on each node with its sub-components, each of which performs a subset of the functionality that is needed to manage containers running on the node.<\/p>\n<ul>\n<li><b>RPC server-\u00a0<\/b>ContainerManager, that accepts requests from Application Masters (AMs) to start new containers, or to stop running ones. It works in association with <i>ContainerTokenSecretManager<\/i>\u00a0to authorize all requests. All the operations performed on containers running on this node are written to an audit log which can be post-processed by security tools.<\/li>\n<\/ul>\n<ul>\n<li><b>ResourceLocalizationService-<\/b>\u00a0Responsible for securely downloading and organizing various file resources needed by containers. It tries its best to distribute the files across all the available disks. It also enforces access control restrictions of the downloaded files and puts appropriate usage limits on them.<\/li>\n<\/ul>\n<ul>\n<li><b>ContainersLauncher-<\/b>\u00a0Maintains a pool of threads to prepare and launch containers as quickly as possible. Also, cleans up the containers\u2019 processes when such a request is sent by the RM or the ApplicationMasters (AMs).<\/li>\n<\/ul>\n<ul>\n<li><b>AuxServices-<\/b>\u00a0The NM provides a framework for extending its functionality by configuring auxiliary services. This allows per-node custom services that specific frameworks may require, and still sandbox them from the rest of the NM. These services have to be configured before NM starts. Auxiliary services are notified when an application\u2019s first container starts on the node, and when the application is considered to be complete.<\/li>\n<\/ul>\n<ul>\n<li><b>ContainersMonitor-<\/b>\u00a0This component starts observing its resource utilization while the container is running. To enforce isolation and fair sharing of resources like memory, each container is allocated some amount of such a resource by the RM. The <i>ContainersMonitor<\/i> monitors each container\u2019s usage continuously and if a container exceeds its allocation, it signals the container to be killed. This is done to prevent any runaway container from adversely affecting other well-behaved containers running on the same node.<\/li>\n<\/ul>\n<ul>\n<li><b>LogHandler-<\/b>\u00a0A pluggable component with the option of either keeping the containers\u2019 logs on the local disks or zipping them together and uploading them onto a file-system.<\/li>\n<\/ul>\n<h3>3. Container Executor<\/h3>\n<p>Interacts with the underlying operating system to securely place files and directories needed by containers and subsequently to launch and clean up processes corresponding to containers in a secure manner.<\/p>\n<h3>4. NodeHealthChecker Service<\/h3>\n<p>The functionality of checking the health of the node by running a configured script regularly is the due responsibility of <i>NodeHealthCheckerService<\/i>. It also monitors the health of the disks specifically by creating temporary files on the disks every so often.<\/p>\n<p>Any changes in the health of the system are notified to <i>NodeStatusUpdater<\/i> which in turn passes on the information to the RM.<\/p>\n<h3>5. Security<\/h3>\n<ul>\n<li><b>ContainerTokenSecretManager:\u00a0<\/b>Examines incoming requests for containers to ensure that all the incoming requests are indeed properly authorized by the <i>ResourceManager<\/i>.<\/li>\n<\/ul>\n<h3>6. WebServer<\/h3>\n<div id=\"attachment_419\" style=\"width: 975px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-Auxiliary-Service.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-419\" class=\"wp-image-419 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-Auxiliary-Service.png\" alt=\"Node Manager Auxiliary Service\" width=\"965\" height=\"567\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-Auxiliary-Service.png 965w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-Auxiliary-Service-150x88.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-Auxiliary-Service-300x176.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Node-Manager-Auxiliary-Service-768x451.png 768w\" sizes=\"auto, (max-width: 965px) 100vw, 965px\" \/><\/a><p id=\"caption-attachment-419\" class=\"wp-caption-text\">Hadoop Yarn Node Manager Auxiliary Service<\/p><\/div>\n<p>Exposes the list of applications, container information running on the node at a given point of time, node-health related information and the logs produced by the containers.<\/p>\n<p>In the case of <strong>MapReduce<\/strong> applications, the Map and Reduce tasks are executed inside the container. However, in between the Map and Reduce tasks (i.e, outside the containers) there is the \u2018Shuffle and Sort\u2019 phase.<\/p>\n<p>The actions within this phase must be additionally specified to YARN as a NodeManager auxiliary service. Below is an illustration.<\/p>\n<p>To summarize briefly, the key functionality of the NodeManager is to facilitate container launch on request from AM. Receiving the container launch request, the NM verifies this request, authorizes the user before resources assignment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this Hadoop Yarn node manager tutorial, we will discuss node manager in Yarn, how it interact with the resource manager, how it allocates containers. We will also cover different Node manager components, how&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":42922,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[2586,5187,5350,5352,9102,16320,16321,16328,16329],"class_list":["post-418","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-yarn","tag-cloudera","tag-hadoop-2","tag-hadoop-yarn","tag-hadoop-yarn-tutorial","tag-node-manager","tag-yarn","tag-yarn-architecture","tag-yarn-introduction","tag-yarn-node-manager"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Deep Dive into Hadoop YARN Node Manager - A Yarn Tutorial - DataFlair<\/title>\n<meta name=\"description\" content=\"Hadoop Yarn Node manager Introduction cover what is yarn node manager in Hadoop,Yarn NodeManager components,Yarn Container Executor, yarn auxiliary services\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deep Dive into Hadoop YARN Node Manager - A Yarn Tutorial - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Hadoop Yarn Node manager Introduction cover what is yarn node manager in Hadoop,Yarn NodeManager components,Yarn Container Executor, yarn auxiliary services\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-13T13:07:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-19T12:54:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Yarn-NodeManager-Components-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deep Dive into Hadoop YARN Node Manager - A Yarn Tutorial - DataFlair","description":"Hadoop Yarn Node manager Introduction cover what is yarn node manager in Hadoop,Yarn NodeManager components,Yarn Container Executor, yarn auxiliary services","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Deep Dive into Hadoop YARN Node Manager - A Yarn Tutorial - DataFlair","og_description":"Hadoop Yarn Node manager Introduction cover what is yarn node manager in Hadoop,Yarn NodeManager components,Yarn Container Executor, yarn auxiliary services","og_url":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2016-06-13T13:07:20+00:00","article_modified_time":"2021-05-19T12:54:25+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Yarn-NodeManager-Components-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"Deep Dive into Hadoop YARN Node Manager &#8211; A Yarn Tutorial","datePublished":"2016-06-13T13:07:20+00:00","dateModified":"2021-05-19T12:54:25+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/"},"wordCount":943,"commentCount":10,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Yarn-NodeManager-Components-01.jpg","keywords":["cloudera","hadoop 2","hadoop yarn","hadoop yarn tutorial","node manager","yarn","yarn architecture","yarn introduction","yarn node manager"],"articleSection":["YARN Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/","url":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/","name":"Deep Dive into Hadoop YARN Node Manager - A Yarn Tutorial - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Yarn-NodeManager-Components-01.jpg","datePublished":"2016-06-13T13:07:20+00:00","dateModified":"2021-05-19T12:54:25+00:00","description":"Hadoop Yarn Node manager Introduction cover what is yarn node manager in Hadoop,Yarn NodeManager components,Yarn Container Executor, yarn auxiliary services","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Yarn-NodeManager-Components-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/Yarn-NodeManager-Components-01.jpg","width":1200,"height":628,"caption":"Deep Dive into Hadoop YARN Node Manager - A Yarn Tutorial"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/hadoop-yarn-node-manager-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"YARN Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/yarn\/"},{"@type":"ListItem","position":3,"name":"Deep Dive into Hadoop YARN Node Manager &#8211; A Yarn Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=418"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":94138,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/418\/revisions\/94138"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/42922"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}