title: Cross product in MapReduce
body: <p>I'd like to perform the expensive operation of cross product across two data sets in Hadoop using Java MapReduce.</p>
  
  <p>For example, I have records from data set A and data set B, and I'd like each record in data set A to be matched up to each record in data set B in the output. I realize that the output size of this would be <code>|A| * |B|</code>, but want to do it anyways.</p>
  
  <p>I see that Pig has <a href="http://pig.apache.org/docs/r0.10.0/basic.html#cross"><code>CROSS</code></a> but am unaware of how it is implemented at a high-level. Perhaps I will go take a look at the source code.</p>
  
  <p>Not looking for any code, just want to know at a high-level how I should approach this problem.</p>