title: Convert timestamp to weekNumber mapReduce
body: <p>I am looking to preprocess timestamps to obtain the corresponding weeknumbers using mapreduce as the dataset has hundreds of millions of instances that need to be processed. I have so far figured out that the first MR job needs to preprocess and sort each line according to timestamp as the key and the rest of the line as value. </p>
  
  <p>The second job then appends the corresponding date to each timestamp object. </p>
  
  <p>I however do not know how to perform the third task I need to accomplish which is to create a continuous timeline of weeknumbers .Meaning, if my minimum timestamp corresponds to the date 03/10/2000 I would like to tag this with a number 10 (indicating that this is the 10th week of the year 2000  let's assume it is if its not in this case.). Then let's say I have the next timestamp corresponding to 02/01/2011, if we assume 52 weeks in the year 2000 and that 02/01/2011 is the 5th week in 2011, I would like to tag this date as week 57 and not as week 5. I would like to know how to achieve this last step in mapreduce. Assuming I have the following input file:</p>
  
  <pre><code>sorted_timestamp1::date::vals....
  sorted_timestamp2::date::vals...
  ...
  ...
  ...
  sorted_timestampn::date::vals.....
  </code></pre>
  
  <p>Simple pseudocode with map and reduce in java would suffice for my case, actual code would be great also.</p>
  
  <p>Thanks in advance for your help!</p>