title: How to calculate Centered Moving Average of a set of data in Hadoop Map-Reduce?
body: <p>I want to calculate Centered Moving average of a set of Data .</p>
  <p><code>Example Input format :</code></p>
  <pre><code>quarter | sales      
  Q1'11   | 9            
  Q2'11   | 8
  Q3'11   | 9
  Q4'11   | 12
  Q1'12   | 9
  Q2'12   | 12
  Q3'12   | 9
  Q4'12   | 10
  </code></pre>
  <p>Mathematical Representation of data and calculation of Moving average and then centered moving average</p>
  <pre><code>Period   Value   MA  Centered
  1          9
  1.5
  2          8
  2.5              9.5
  3          9            9.5
  3.5              9.5
  4          12           10.0
  4.5              10.5
  5          9            10.750
  5.5              11.0
  6          12
  6.5
  7          9  
  </code></pre>
  <p>I am stuck with the implementation of RecordReader which will provide mapper sales value of a year i.e. of four quarter.</p>