title: RDD Aggregate in spark
body: <p>I am an Apache Spark learner and have come across a <code>RDD</code> action <code>aggregate</code> which I have no clue of how it functions. Can some one spell out and explain in detail step by step how did we arrive at the below result for the code here</p>
  
  <pre><code>RDD input = {1,2,3,3}
  
  RDD Aggregate function :
  
  rdd.aggregate((0, 0))
  ((x, y) =&gt;
  (x._1 + y, x._2 + 1),
  (x, y) =&gt;
  (x._1 + y._1, x._2 + y._2))
  
  output : {9,4}
  </code></pre>
  
  <p>Thanks</p>