title: Counting unique login using Map Reduce
body: <p>Let say I have a very big log file with this kind of format( based on where a user login )</p>
  
  <pre><code>UserId1 , New York
  UserId1 , New Jersey
  UserId2 , Oklahoma
  UserId3 , Washington DC
  ....
  userId999999999, London
  </code></pre>
  
  <p>Note that UserId1 logged in New York first and then he flied to New Jersey and logged again from there.</p>
  
  <p>If I need to get how many unique user login (means 2 login will same userid considered as 1 login), how should I map and reduce it? </p>
  
  <p>My initial plan is that I want to map it first to this kind of format :</p>
  
  <pre><code>UserId1, 1
  UserId1, 1
  UserId2, 1
  UserId3, 1
  </code></pre>
  
  <p>And then reduce it to </p>
  
  <pre><code>UserId1, 2
  UserId2, 1
  UserId3, 1
  </code></pre>
  
  <p>But would this cause the output to be still big in number (Especially if common behaviour of user is to login 1 or 2 times a day ). Or is there a better way to implement this?    </p>