title: Hadoop - Multiple input and join between these input files
body: <p>I want to use Hadoop on multiple files (actually 2 files) as a input files.</p>
  
  <p>For example:</p>
  
  <p><strong>File input 1:</strong></p>
  
  <pre><code>user1 italy
  user2 spain
  user3 italy
  ...
  </code></pre>
  
  <p><strong>File input 2:</strong></p>
  
  <pre><code>user1 trackname1
  user2 trackname2
  user3 trackname1
  ...
  </code></pre>
  
  <p>I need the number of users per country, then for each country the most popular tracks in (file 2). And finally the number of occurrences of the most popular tracks.</p>
  
  <p>I Would like to have as <strong>outputs</strong>, something like:</p>
  
  <pre><code>Popular track (italy):
  trackname1 (occurrences)
  
  Popular track (spain):
  trackname2
  
  ...
  </code></pre>
  
  <p>Actually i've tried to use 2 mappers and 1 reducer. But I don't know how to make the "join" between the two input files on the user field. What could be the best solution for that?</p>
  
  <p>Any advice?</p>
  
  <p>Thanks!</p>