{"id":109209,"date":"2021-02-18T17:12:24","date_gmt":"2021-02-18T11:42:24","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?page_id=109209"},"modified":"2024-04-12T14:30:28","modified_gmt":"2024-04-12T09:00:28","slug":"combiner-functions","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/","title":{"rendered":"Combiner Functions"},"content":{"rendered":"\n<p>A Combiner, also known as a semi-reducer, is an optional class that operates by accepting the inputs from the Map class and thereafter passing the output key-value pairs to the Reducer class. The main function of a Combiner is to summarize the map output records with the same key. The output (key-value collection) of the combiner will be sent over the network to the actual Reducer task as input.<\/p>\n\n\n\n<p>The Combiner class is used in between the Map class and the Reduce class to reduce the volume of data transfer between Map and Reduce. Usually, the output of the map task is large and the data transferred to the reduce task is high. The following MapReduce task diagram shows the COMBINER PHASE.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg\" alt=\"combiner-functions\" class=\"wp-image-27594\"\/><\/figure><\/div>\n\n\n\n<p>A combiner does not have a predefined interface and it must implement the Reducer interface\u2019s reduce() method. A combiner operates on each map output key. It must have the same output key-value types as the Reducer class. A combiner can produce summary information from a large dataset because it replaces the original Map output. Although, Combiner is optional yet it helps segregating data into multiple groups for Reduce phase, which makes it easier to process.<\/p>\n\n\n\n<p><strong>Combiner Advantage<\/strong><\/p>\n\n\n\n<p>When a MapReduce Job is run on a large dataset, Hadoop Mapper generates large chunks of intermediate data that is passed on to Hadoop Reducer for further processing, which leads to massive network congestion. So how do go about reducing this network congestion? Is there any function in Hadoop to address this issue? The MapReduce framework offers a function known as \u2018Combiner\u2019 that can play a crucial role in reducing network congestion. As a matter of fact \u2018Combiner\u2019 is also termed as \u2018Mini-reducer\u2019. It is important to note that the primary job of a Hadoop Combiner is to process the output data from Hadoop Mapper, before passing it to a Hadoop Reducer. Technically speaking, Combiner and Reducer use the same code.<\/p>\n\n\n\n<p>In order to understand the concept of Hadoop Combiner effectively, let\u2019s consider the following use case, which identifies the number of complaints reported in each state. Below is the code snippet<\/p>\n\n\n\n<p>package com.evoke.bigdata.mr.complaint;<\/p>\n\n\n\n<p>import org.apache.hadoop.fs.Path;<\/p>\n\n\n\n<p>import org.apache.hadoop.io.IntWritable;<\/p>\n\n\n\n<p>import org.apache.hadoop.io.Text;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.FileInputFormat;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.FileOutputFormat;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.JobClient;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.JobConf;<\/p>\n\n\n\n<p>import org.apache.hadoop.conf.Configured;<\/p>\n\n\n\n<p>import org.apache.hadoop.util.Tool;<\/p>\n\n\n\n<p>import org.apache.hadoop.util.ToolRunner;<\/p>\n\n\n\n<p>public class ComplaintCombiner extends Configured implements Tool {<\/p>\n\n\n\n<p>@Override<\/p>\n\n\n\n<p>public int run(String[] args) throws Exception {<\/p>\n\n\n\n<p>String input, output;<\/p>\n\n\n\n<p>if(args.length == 2) {<\/p>\n\n\n\n<p>input = args[0];<\/p>\n\n\n\n<p>output = args[1];<\/p>\n\n\n\n<p>} else {<\/p>\n\n\n\n<p>input = &#8220;your-input-dir&#8221;;<\/p>\n\n\n\n<p>output = &#8220;your-output-dir&#8221;;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>JobConf conf = new JobConf(getConf(), ComplaintCombiner.class);<\/p>\n\n\n\n<p>conf.setJobName(this.getClass().getName());<\/p>\n\n\n\n<p>FileInputFormat.setInputPaths(conf, new Path(input));<\/p>\n\n\n\n<p>FileOutputFormat.setOutputPath(conf, new Path(output));<\/p>\n\n\n\n<p>conf.setMapperClass(StateMapper.class);<\/p>\n\n\n\n<p>conf.setReducerClass(SumCombiner.class);<\/p>\n\n\n\n<p>\/\/conf.setCombinerClass(SumCombiner.class);<\/p>\n\n\n\n<p>conf.setMapOutputKeyClass(Text.class);<\/p>\n\n\n\n<p>conf.setMapOutputValueClass(IntWritable.class);<\/p>\n\n\n\n<p>conf.setOutputKeyClass(Text.class);<\/p>\n\n\n\n<p>conf.setOutputValueClass(IntWritable.class);<\/p>\n\n\n\n<p>JobClient.runJob(conf);<\/p>\n\n\n\n<p>return 0;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>public static void main(String[] args) throws Exception {<\/p>\n\n\n\n<p>int exitCode = ToolRunner.run(new ComplaintCombiner(), args);<\/p>\n\n\n\n<p>System.exit(exitCode);<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>Below is the mapper code that can be used to retrieve complaints for each state:<\/p>\n\n\n\n<p>package com.evoke.bigdata.mr.complaint;<\/p>\n\n\n\n<p>import java.io.IOException;<\/p>\n\n\n\n<p>import org.apache.hadoop.io.IntWritable;<\/p>\n\n\n\n<p>import org.apache.hadoop.io.LongWritable;<\/p>\n\n\n\n<p>import org.apache.hadoop.io.Text;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.MapReduceBase;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.Mapper;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.OutputCollector;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.Reporter;<\/p>\n\n\n\n<p>public class StateMapper extends MapReduceBase implements<\/p>\n\n\n\n<p>Mapper&lt;LongWritable, Text, Text, IntWritable&gt; {<\/p>\n\n\n\n<p>@Override<\/p>\n\n\n\n<p>public void map(LongWritable key, Text value,<\/p>\n\n\n\n<p>OutputCollector&lt;Text, IntWritable&gt; output, Reporter reporter)<\/p>\n\n\n\n<p>throws IOException {<\/p>\n\n\n\n<p>String s = value.toString();<\/p>\n\n\n\n<p>String[] fields = value.toString().split(&#8220;,&#8221;);<\/p>\n\n\n\n<p>if (fields.length &gt; 1) {<\/p>\n\n\n\n<p>output.collect(new Text(fields[5]), new IntWritable(1));<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>And lastly, here\u2019s the Reducer\/Combiner code that provides the total number of complaints received in each state:<\/p>\n\n\n\n<p>package com.evoke.bigdata.mr.complaint;<\/p>\n\n\n\n<p>import java.io.IOException;<\/p>\n\n\n\n<p>import java.util.Iterator;<\/p>\n\n\n\n<p>import org.apache.hadoop.io.IntWritable;<\/p>\n\n\n\n<p>import org.apache.hadoop.io.Text;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.OutputCollector;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.MapReduceBase;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.Reducer;<\/p>\n\n\n\n<p>import org.apache.hadoop.mapred.Reporter;<\/p>\n\n\n\n<p>public class SumCombiner extends MapReduceBase implements<\/p>\n\n\n\n<p>Reducer&lt;Text, IntWritable, Text, IntWritable&gt; {<\/p>\n\n\n\n<p>@Override<\/p>\n\n\n\n<p>public void reduce(Text key, Iterator&lt;IntWritable&gt; values,<\/p>\n\n\n\n<p>OutputCollector&lt;Text, IntWritable&gt; output, Reporter reporter)<\/p>\n\n\n\n<p>throws IOException {<\/p>\n\n\n\n<p>int stateCount = 0;<\/p>\n\n\n\n<p>while (values.hasNext()) {<\/p>\n\n\n\n<p>IntWritable value = values.next();<\/p>\n\n\n\n<p>stateCount += value.get();<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>output.collect(key, new IntWritable(stateCount));<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>In like manner, if the same job is executed using Hadoop Combiner by replacing setReducerClass method with a setCombinerClass method in the job code, it will drastically reduce the number of bytes transmitted over the network. Furthermore, we can clearly observe in the Job Tracker UI that very limited data is transferred to the Reduce phase<\/p>\n\n\n\n<p><strong>Combiner Example<\/strong><\/p>\n\n\n\n<p>The following example provides a theoretical idea about combiners. Let us assume we have the following input text file named input.txt for MapReduce.<\/p>\n\n\n\n<p>What do you mean by Object<\/p>\n\n\n\n<p>What do you know about Java<\/p>\n\n\n\n<p>What is Java Virtual Machine<\/p>\n\n\n\n<p>How Java enabled High Performance<\/p>\n\n\n\n<p>The important phases of the MapReduce program with Combiner are<\/p>\n\n\n\n<p><strong>Record Reader<\/strong> &#8211; This is the first phase of MapReduce where the Record Reader reads every line from the input text file as text and yields output as key-value pairs.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Input \u2212 Line by line text from the input file.<\/li><li>Output \u2212 Forms the key-value pairs. The following is the set of expected key-value pairs.<\/li><\/ul>\n\n\n\n<p>&lt;1, What do you mean by Object&gt;<\/p>\n\n\n\n<p>&lt;2, What do you know about Java&gt;<\/p>\n\n\n\n<p>&lt;3, What is Java Virtual Machine&gt;<\/p>\n\n\n\n<p>&lt;4, How Java enabled High Performance&gt;<\/p>\n\n\n\n<p><strong>Map Phase<\/strong> &#8211; The Map phase takes input from the Record Reader, processes it, and produces the output as another set of key-value pairs.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Input \u2212 The following key-value pair is the input taken from the Record Reader.<\/li><\/ul>\n\n\n\n<p>&lt;1, What do you mean by Object&gt;<\/p>\n\n\n\n<p>&lt;2, What do you know about Java&gt;<\/p>\n\n\n\n<p>&lt;3, What is Java Virtual Machine&gt;<\/p>\n\n\n\n<p>&lt;4, How Java enabled High Performance&gt;<\/p>\n\n\n\n<p>The Map phase reads each key-value pair, divides each word from the value using StringTokenizer, treats each word as key and the count of that word as value. The following code snippet shows the Mapper class and the map function.<\/p>\n\n\n\n<p>public static class TokenizerMapper extends Mapper&lt;Object, Text, Text, IntWritable&gt;<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>private final static IntWritable one = new IntWritable(1);<\/p>\n\n\n\n<p>private Text word = new Text();<\/p>\n\n\n\n<p>public void map(Object key, Text value, Context context) throws IOException, InterruptedException<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>StringTokenizer itr = new StringTokenizer(value.toString());<\/p>\n\n\n\n<p>while (itr.hasMoreTokens())<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>word.set(itr.nextToken());<\/p>\n\n\n\n<p>context.write(word, one);<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Output \u2212 The expected output is as<\/li><\/ul>\n\n\n\n<p>&lt;What,1&gt; &lt;do,1&gt; &lt;you,1&gt; &lt;mean,1&gt; &lt;by,1&gt; &lt;Object,1&gt;<\/p>\n\n\n\n<p>&lt;What,1&gt; &lt;do,1&gt; &lt;you,1&gt; &lt;know,1&gt; &lt;about,1&gt; &lt;Java,1&gt;<\/p>\n\n\n\n<p>&lt;What,1&gt; &lt;is,1&gt; &lt;Java,1&gt; &lt;Virtual,1&gt; &lt;Machine,1&gt;<\/p>\n\n\n\n<p>&lt;How,1&gt; &lt;Java,1&gt; &lt;enabled,1&gt; &lt;High,1&gt; &lt;Performance,1&gt;<\/p>\n\n\n\n<p><strong>Combiner Phase<\/strong> &#8211; The Combiner phase takes each key-value pair from the Map phase, processes it, and produces the output as key-value collection pairs.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Input \u2212 The following key-value pair is the input taken from the Map phase.<\/li><\/ul>\n\n\n\n<p>&lt;What,1&gt; &lt;do,1&gt; &lt;you,1&gt; &lt;mean,1&gt; &lt;by,1&gt; &lt;Object,1&gt;<\/p>\n\n\n\n<p>&lt;What,1&gt; &lt;do,1&gt; &lt;you,1&gt; &lt;know,1&gt; &lt;about,1&gt; &lt;Java,1&gt;<\/p>\n\n\n\n<p>&lt;What,1&gt; &lt;is,1&gt; &lt;Java,1&gt; &lt;Virtual,1&gt; &lt;Machine,1&gt;<\/p>\n\n\n\n<p>&lt;How,1&gt; &lt;Java,1&gt; &lt;enabled,1&gt; &lt;High,1&gt; &lt;Performance,1&gt;<\/p>\n\n\n\n<p>The Combiner phase reads each key-value pair, combines the common words as key and values as collection. Usually, the code and operation for a Combiner is similar to that of a Reducer. Following is the code snippet for Mapper, Combiner and Reducer class declaration.<\/p>\n\n\n\n<p>job.setMapperClass(TokenizerMapper.class);<\/p>\n\n\n\n<p>job.setCombinerClass(IntSumReducer.class);<\/p>\n\n\n\n<p>job.setReducerClass(IntSumReducer.class);<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Output \u2212 The expected output is<\/li><\/ul>\n\n\n\n<p>&lt;What,1,1,1&gt; &lt;do,1,1&gt; &lt;you,1,1&gt; &lt;mean,1&gt; &lt;by,1&gt; &lt;Object,1&gt;<\/p>\n\n\n\n<p>&lt;know,1&gt; &lt;about,1&gt; &lt;Java,1,1,1&gt;<\/p>\n\n\n\n<p>&lt;is,1&gt; &lt;Virtual,1&gt; &lt;Machine,1&gt;<\/p>\n\n\n\n<p>&lt;How,1&gt; &lt;enabled,1&gt; &lt;High,1&gt; &lt;Performance,1&gt;<\/p>\n\n\n\n<p><strong>Reducer Phase<\/strong> &#8211; The Reducer phase takes each key-value collection pair from the Combiner phase, processes it, and passes the output as key-value pairs. Note that the Combiner functionality is same as the Reducer.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Input \u2212 The following key-value pair is the input taken from the Combiner phase.<\/li><\/ul>\n\n\n\n<p>&lt;What,1,1,1&gt; &lt;do,1,1&gt; &lt;you,1,1&gt; &lt;mean,1&gt; &lt;by,1&gt; &lt;Object,1&gt;<\/p>\n\n\n\n<p>&lt;know,1&gt; &lt;about,1&gt; &lt;Java,1,1,1&gt;<\/p>\n\n\n\n<p>&lt;is,1&gt; &lt;Virtual,1&gt; &lt;Machine,1&gt;<\/p>\n\n\n\n<p>&lt;How,1&gt; &lt;enabled,1&gt; &lt;High,1&gt; &lt;Performance,1&gt;<\/p>\n\n\n\n<p>The Reducer phase reads each key-value pair. Following is the code snippet for the Combiner.<\/p>\n\n\n\n<p>public static class IntSumReducer extends Reducer&lt;Text,IntWritable,Text,IntWritable&gt;<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>private IntWritable result = new IntWritable();<\/p>\n\n\n\n<p>public void reduce(Text key, Iterable&lt;IntWritable&gt; values,Context context) throws IOException, InterruptedException<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>int sum = 0;<\/p>\n\n\n\n<p>for (IntWritable val : values)<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>sum += val.get();<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>result.set(sum);<\/p>\n\n\n\n<p>context.write(key, result);<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Output \u2212 The expected output from the Reducer phase is as<\/li><\/ul>\n\n\n\n<p>&lt;What,3&gt; &lt;do,2&gt; &lt;you,2&gt; &lt;mean,1&gt; &lt;by,1&gt; &lt;Object,1&gt;<\/p>\n\n\n\n<p>&lt;know,1&gt; &lt;about,1&gt; &lt;Java,3&gt;<\/p>\n\n\n\n<p>&lt;is,1&gt; &lt;Virtual,1&gt; &lt;Machine,1&gt;<\/p>\n\n\n\n<p>&lt;How,1&gt; &lt;enabled,1&gt; &lt;High,1&gt; &lt;Performance,1&gt;<\/p>\n\n\n\n<p><strong>Record Writer<\/strong> &#8211; This is the last phase of MapReduce where the Record Writer writes every key-value pair from the Reducer phase and sends the output as text.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Input \u2212 Each key-value pair from the Reducer phase along with the Output format.<\/li><li>Output \u2212 It gives you the key-value pairs in text format. Following is the expected output.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>What<\/td><td>3<\/td><\/tr><tr><td>do<\/td><td>2<\/td><\/tr><tr><td>you<\/td><td>2<\/td><\/tr><tr><td>mean<\/td><td>1<\/td><\/tr><tr><td>by<\/td><td>1<\/td><\/tr><tr><td>Object<\/td><td>1<\/td><\/tr><tr><td>know<\/td><td>1<\/td><\/tr><tr><td>about<\/td><td>1<\/td><\/tr><tr><td>Java<\/td><td>3<\/td><\/tr><tr><td>is<\/td><td>1<\/td><\/tr><tr><td>Virtual<\/td><td>1<\/td><\/tr><tr><td>Machine<\/td><td>1<\/td><\/tr><tr><td>How<\/td><td>1<\/td><\/tr><tr><td>enabled<\/td><td>1<\/td><\/tr><tr><td>High<\/td><td>1<\/td><\/tr><tr><td>Performance<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>A Combiner, also known as a semi-reducer, is an optional class that operates by accepting the inputs from the Map class and thereafter passing the output key-value pairs to the Reducer class. The main function of a Combiner is to summarize the map output records with the same key. The output (key-value collection) of the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-109209","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Combiner Functions - Tutorial<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Combiner Functions - Tutorial\" \/>\n<meta property=\"og:description\" content=\"A Combiner, also known as a semi-reducer, is an optional class that operates by accepting the inputs from the Map class and thereafter passing the output key-value pairs to the Reducer class. The main function of a Combiner is to summarize the map output records with the same key. The output (key-value collection) of the...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T09:00:28+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/\",\"name\":\"Combiner Functions - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg\",\"datePublished\":\"2021-02-18T11:42:24+00:00\",\"dateModified\":\"2024-04-12T09:00:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#primaryimage\",\"url\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg\",\"contentUrl\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Combiner Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Combiner Functions - Tutorial","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:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/","og_locale":"en_US","og_type":"article","og_title":"Combiner Functions - Tutorial","og_description":"A Combiner, also known as a semi-reducer, is an optional class that operates by accepting the inputs from the Map class and thereafter passing the output key-value pairs to the Reducer class. The main function of a Combiner is to summarize the map output records with the same key. The output (key-value collection) of the...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T09:00:28+00:00","og_image":[{"url":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/","name":"Combiner Functions - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#primaryimage"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#primaryimage"},"thumbnailUrl":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg","datePublished":"2021-02-18T11:42:24+00:00","dateModified":"2024-04-12T09:00:28+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#primaryimage","url":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg","contentUrl":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/06\/combiner-functions.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/combiner-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Combiner Functions"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/109209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=109209"}],"version-history":[{"count":1,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/109209\/revisions"}],"predecessor-version":[{"id":109210,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/109209\/revisions\/109210"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=109209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=109209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=109209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}