<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Combining calculations within the same job in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Combining-calculations-within-the-same-job/m-p/7167#M1240</link>
    <description>&lt;P&gt;Greetings,&lt;BR /&gt;I was wondering if we can combine multiple "calculations" within a single job that operate on the same data.&lt;BR /&gt;&lt;BR /&gt;For example lets go back to the basic wordcount. Given a large document, along with&lt;BR /&gt;a) the total number of words, we want to count&lt;BR /&gt;b) the total number of sentences and&lt;BR /&gt;c) the total number of paragraphs in it.&lt;BR /&gt;&lt;BR /&gt;All three tasks operate on the same data, and differ only on the delimiter of the tokenization. Is it valid to combine all three within the same job in the same mapreduce program, or do we have to write three individual programs and run each on the whole dataset?&lt;BR /&gt;&lt;BR /&gt;So to generalize: can we "combine" different calculations on the same data? What if one of the calculations needed to emit different &amp;lt;key, value&amp;gt; data types (both on the mapper and the reducer)? What are the pros and cons of such an approach? Is it safe? Will it be faster than running three jobs separately?&lt;/P&gt;&lt;P&gt;Can the reducer emit different output files for each calculation? What is the best implementation for the whole approach?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 08:55:03 GMT</pubDate>
    <dc:creator>missing-link</dc:creator>
    <dc:date>2022-09-16T08:55:03Z</dc:date>
    <item>
      <title>Combining calculations within the same job</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Combining-calculations-within-the-same-job/m-p/7167#M1240</link>
      <description>&lt;P&gt;Greetings,&lt;BR /&gt;I was wondering if we can combine multiple "calculations" within a single job that operate on the same data.&lt;BR /&gt;&lt;BR /&gt;For example lets go back to the basic wordcount. Given a large document, along with&lt;BR /&gt;a) the total number of words, we want to count&lt;BR /&gt;b) the total number of sentences and&lt;BR /&gt;c) the total number of paragraphs in it.&lt;BR /&gt;&lt;BR /&gt;All three tasks operate on the same data, and differ only on the delimiter of the tokenization. Is it valid to combine all three within the same job in the same mapreduce program, or do we have to write three individual programs and run each on the whole dataset?&lt;BR /&gt;&lt;BR /&gt;So to generalize: can we "combine" different calculations on the same data? What if one of the calculations needed to emit different &amp;lt;key, value&amp;gt; data types (both on the mapper and the reducer)? What are the pros and cons of such an approach? Is it safe? Will it be faster than running three jobs separately?&lt;/P&gt;&lt;P&gt;Can the reducer emit different output files for each calculation? What is the best implementation for the whole approach?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 08:55:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Combining-calculations-within-the-same-job/m-p/7167#M1240</guid>
      <dc:creator>missing-link</dc:creator>
      <dc:date>2022-09-16T08:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Combining calculations within the same job</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Combining-calculations-within-the-same-job/m-p/7192#M1241</link>
      <description>Wherever possible, it is always good to combine multiple goals into the same job to avoid extra I/O and additional job bootup/cleanup overheads. Optimisers in Hive and Pig try to do this as well.&lt;BR /&gt;&lt;BR /&gt;The reducer can emit different outputs via the MultipleOutputs classes. For map outputs, you'll need to build some form of "general" class and hierarchy that can cater to different styles of output and partition them appropriately. Its definitely possible, but needs some additional work.</description>
      <pubDate>Sat, 08 Mar 2014 02:16:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Combining-calculations-within-the-same-job/m-p/7192#M1241</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2014-03-08T02:16:47Z</dc:date>
    </item>
  </channel>
</rss>

