{"id":1217,"date":"2019-03-31T11:44:47","date_gmt":"2019-03-31T11:44:47","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=1217"},"modified":"2024-04-06T10:05:50","modified_gmt":"2024-04-06T10:05:50","slug":"introduction-to-hadoop-mapreduce","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/","title":{"rendered":"Introduction to Hadoop MapReduce"},"content":{"rendered":"<h2><span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;MapReduce Tutorial - Apache Hadoop&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:6145,&quot;3&quot;:{&quot;1&quot;:0,&quot;3&quot;:1},&quot;14&quot;:{&quot;1&quot;:3,&quot;3&quot;:1},&quot;15&quot;:&quot;Arial&quot;}\">MapReduce Tutorial &#8211; Apache Hadoop<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p><strong>Introduction to Hadoop MapReduce<\/strong>, Welcome to the world of <a href=\"https:\/\/prwatech.in\/hadoop-training-institute-in-bangalore\/\">Hadoop<\/a> MapReduce Tutorials. In these Tutorials, one can explore Introduction to Hadoop MapReduce and Hadoop MapReduce data flow Process. Learn More advanced Tutorials on how a MapReduce works by taking an example from India\u2019s Leading <a href=\"https:\/\/prwatech.in\/hadoop-training-institute-in-bangalore\/\">Hadoop Training institute<\/a> which Provides advanced <a href=\"https:\/\/prwatech.in\/hadoop-training-institute-in-bangalore\/\">Hadoop Course<\/a> for those tech enthusiasts who wanted to explore the technology from scratch to advanced level like a Pro.<\/p>\n<p>&nbsp;<\/p>\n<p>We <a href=\"http:\/\/prwatech.com\/\">Prwatech<\/a> the Pioneers of <a href=\"https:\/\/prwatech.in\/hadoop-training-institute-in-bangalore\/\">Hadoop Training<\/a> offering advanced certification course and Introduction to Hadoop MapReduce to those who are keen to explore the technology under the World-class Training Environment.<\/p>\n<p>&nbsp;<\/p>\n<h2>What is MapReduce?<\/h2>\n<p>&nbsp;<\/p>\n<p><strong>MapReduce<\/strong> is a programming framework that allows users to perform parallel and distributed processing of large data sets in a distributed environment.\u00a0 MapReduce is divided into two basic tasks:<\/p>\n<ol>\n<li>Mapper<\/li>\n<li>Reducer<\/li>\n<\/ol>\n<p>Mapper and Reducer both work in sequence. First the job is being passed through mapper part and then it\u2019s being passed on to Reducer for further execution.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>How MapReduce Works?<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>The MapReduce algorithm contains two important tasks, namely Map and Reduce.<\/p>\n<p>The Map task takes a set of data and converts it into another set of data, where individual elements are broken down into tuples (key-value pairs).<\/p>\n<p>The Reduce task takes the output from the Map as an input and combines those data tuples (key-value pairs) into a smaller set of tuples.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1218\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png\" alt=\"Introduction to Hadoop MapReduce\" width=\"850\" height=\"504\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png 647w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0-300x178.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>INPUT AND OUTPUT:<\/h3>\n<p>&nbsp;<\/p>\n<p>MapReduce takes input in the form of Keys and value.<\/p>\n<h3>Input and Output types of a MapReduce job:<\/h3>\n<p>&nbsp;<\/p>\n<p><strong>(input)<\/strong> &lt;k1, v1&gt; -&gt; <strong>map<\/strong> -&gt; &lt;k2, v2&gt; -&gt; <strong>shuffle and sorting<\/strong> -&gt; &lt;k2, v2&gt; -&gt; <strong>reduce<\/strong> -&gt; &lt;k3, v3&gt; <strong>(output)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3><strong><u>\u00a0Mapper<\/u><\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/hadoop.apache.org\/docs\/r2.8.0\/api\/org\/apache\/hadoop\/mapreduce\/Mapper.html\">The Mapper<\/a> maps input key\/value pairs to a set of intermediate key\/value pairs. Mapper works in three phases:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Phase I: Input:<\/strong> Input is provided to mapper by user for processing of data set.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>#Phase II: Splitting:<\/strong> In this phase splitting of input data is do on the basis of key-value.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Phase III: Mapping:<\/strong> All these data are then arrang in the particular format on the basis of their key and value. And then these keys and value is pass on to Reducer for further processing.<\/p>\n<p>&nbsp;<\/p>\n<h3>Reducer<\/h3>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/hadoop.apache.org\/docs\/r2.8.0\/api\/org\/apache\/hadoop\/mapreduce\/Reducer.html\">Reducer<\/a> reduces a set of intermediate values which share a key to a smaller set of values.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Phase I:<\/strong> <strong>Shuffling and Sorting<\/strong>:\u00a0 After data set\u00a0 process through mapper stage the process data set is pass on to shuffling phase. In this phase the data set is shuffle and sort according to the keys and values.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Phase II:<\/strong> <strong>Reducing:<\/strong> After the data sets are sort on the basic of their key-value, the values with same key are sort together and reduce into single form on the basis of similar key value.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Phase III:<\/strong> <strong>Final result<\/strong>: After reducing the data set the final output is been present to user according to their requirement.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1220\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/6-19.png\" alt=\"Introduction to Hadoop MapReduce\" width=\"850\" height=\"420\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/6-19.png 571w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/6-19-300x148.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Record reader:<\/strong> The basic function of Record Reader is to convert the input file into key and value pair (k,v).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>k:<\/strong> offset value : Address : It is a unique value to call the content<\/p>\n<p><strong>v:<\/strong> content of record<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/-k_w6RgdHDI\" width=\"650\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MapReduce Tutorial &#8211; Apache Hadoop &nbsp; Introduction to Hadoop MapReduce, Welcome to the world of Hadoop MapReduce Tutorials. In these Tutorials, one can explore Introduction to Hadoop MapReduce and Hadoop MapReduce data flow Process. Learn More advanced Tutorials on how a MapReduce works by taking an example from India\u2019s Leading Hadoop Training institute which Provides [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,1642],"tags":[1866,1864,284,1865],"class_list":["post-1217","post","type-post","status-publish","format-standard","hentry","category-hadoop","category-mapreduce","tag-iii-introduction-to-hadoop-and-mapreduce-programming","tag-introduction-to-hadoop","tag-introduction-to-hadoop-mapreduce","tag-mapreduce-tutorial-apache-hadoop"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MapReduce Tutorial - Apache Hadoop - Prwatech<\/title>\n<meta name=\"description\" content=\"Master MapReduce Tutorial - Apache Hadoop - Dive deep with our expert instructors and comprehensive curriculum.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MapReduce Tutorial - Apache Hadoop - Prwatech\" \/>\n<meta property=\"og:description\" content=\"Master MapReduce Tutorial - Apache Hadoop - Dive deep with our expert instructors and comprehensive curriculum.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-31T11:44:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-06T10:05:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/\",\"url\":\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/\",\"name\":\"MapReduce Tutorial - Apache Hadoop - Prwatech\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png\",\"datePublished\":\"2019-03-31T11:44:47+00:00\",\"dateModified\":\"2024-04-06T10:05:50+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Master MapReduce Tutorial - Apache Hadoop - Dive deep with our expert instructors and comprehensive curriculum.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png\",\"width\":647,\"height\":384},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to Hadoop MapReduce\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MapReduce Tutorial - Apache Hadoop - Prwatech","description":"Master MapReduce Tutorial - Apache Hadoop - Dive deep with our expert instructors and comprehensive curriculum.","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"MapReduce Tutorial - Apache Hadoop - Prwatech","og_description":"Master MapReduce Tutorial - Apache Hadoop - Dive deep with our expert instructors and comprehensive curriculum.","og_url":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2019-03-31T11:44:47+00:00","article_modified_time":"2024-04-06T10:05:50+00:00","og_image":[{"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png","type":"","width":"","height":""}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/","url":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/","name":"MapReduce Tutorial - Apache Hadoop - Prwatech","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png","datePublished":"2019-03-31T11:44:47+00:00","dateModified":"2024-04-06T10:05:50+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Master MapReduce Tutorial - Apache Hadoop - Dive deep with our expert instructors and comprehensive curriculum.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/03\/0.png","width":647,"height":384},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/hadoop\/mapreduce\/introduction-to-hadoop-mapreduce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Introduction to Hadoop MapReduce"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=1217"}],"version-history":[{"count":9,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1217\/revisions"}],"predecessor-version":[{"id":11284,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1217\/revisions\/11284"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=1217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=1217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=1217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}