title: Compare two files in Hadoop MapReduce
body: <p>Hi I'm pretty new to Hadoop and mapreduce..I'm wondering if something like this is possible.
  I'm trying to compare two files through Mapreduce..
  The first file may look something like this:</p>
  
  <pre><code>t1 r1
  t2 r2
  t1 r4
  </code></pre>
  
  <p>The second file will look something like this:</p>
  
  <pre><code>u1 t1 r1
  u2 t2 r3
  u3 t2 r2
  u4 t1 r1
  </code></pre>
  
  <p>I want it to emit <code>u1</code>, <code>u3</code> and <code>u4</code> based on the files. The second file will be considerably larger than the first file. I'm not too sure how to compare these files; is this doable in one MapReduce job? I'm willing to chain MapReduce jobs if I have to though. </p>