title: How to do aggregation with Spring Batch?
body: <p>I am trying to figure out how to do aggregation with Spring Batch.
  For example, I have a CSV file with a list of names:</p>
  
  <pre><code>name
  John
  Amy
  John
  Ryan
  </code></pre>
  
  <p>And I want name count in text file:</p>
  
  <pre><code>name, count
  Amy, 1
  John, 2
  Ryan, 1
  </code></pre>
  
  <p>From what I learned from Spring Batch, the ETL batch process (itemReader -> ItemProcessor -> ItemWriter) is more like just a mapping phase in map-reduce lingo. How do I do the reduce(aggregation) phase in Spring Batch?</p>
  
  <p>Is Spring Batch the right tool to use? Or should I use Spark for this? Thanks.</p>