title: Chaining multiple MapReduce jobs in Hadoop
body: <p>In many real-life situations where you apply MapReduce, the final algorithms end up being several MapReduce steps.</p>
  
  <p>i.e. Map1 , Reduce1 , Map2 , Reduce2 , and so on.</p>
  
  <p>So you have the output from the last reduce that is needed as the input for the next map. </p>
  
  <p>The intermediate data is something you (in general) do not want to keep once the pipeline has been successfully completed. Also because this intermediate data is in general some data structure (like a 'map' or a 'set') you don't want to put too much effort in writing and reading these key-value pairs.</p>
  
  <p>What is the recommended way of doing that in Hadoop?</p>
  
  <p>Is there a (simple) example that shows how to handle this intermediate data in the correct way, including the cleanup afterward?</p>