title: How to get past "N" seconds data while processing current batch in Dstream
body: <p>I am new to the spark world. 
  Having a weather  streaming applications receiving time based dstream (in form of tuples) of below type:</p>
  
  <pre><code>{
    timestamp, 
    { v1, v2, v3} 
  } 
  </code></pre>
  
  <p>where v1=temp, v2=humidity, v3=windrate</p>
  
  <p>Example: <code>{ 01/05/2016 08:01:00,  { 25,4.2,10}}</code></p>
  
  <p>Now my requirement is to check temperature for every incoming record and if it crosses 35 then stop processing and dump last 10 mins data to hdfs for further investigation. </p>