title: Use reduceByKeyAndWindow in Spark Streaming on multiple values
body: <p>have a question on the reduceByKeyAndWindow function in Spark Streaming. This might be naive, am new-ish to both Scala and Spark.</p>
  
  <p>After parsing my data I have this data set with three columns: 
    Column 1: Key, 
    Column 2: Amount (Long), 
    Column 3: Count (Long)</p>
  
  <p>Is there a way to run this through the reduceByKeyAndWindow function and get the sum of both Column 2 (Amount) and Column 3 (Count) over a specified window?</p>
  
  <p>From what I have read, looks like the reduceByKeyAndWindow function expects only two columns (key, value), so what I am currently doing is creating two data sets:
     <strong>Data set 1</strong>: key, Amount &amp;&amp; 
     <strong>Data set 2</strong>: key, Count</p>
  
  <p>And then, I am calling the reduceByKeyAndWindow twice. Would be great if I could just do it once (the parameters to reduce are same of both the amount and count columns)</p>
  
  <p>Does this question make sense? Any inputs would be awesome!!</p>