title: Moving Average in Spark Java
body: <p>I have real time streaming data coming into spark and I would like to do a moving average forecasting on that time-series data. Is there any way to implement this using spark in Java?</p>
  
  <p>I've already referred to : <a href="https://gist.github.com/samklr/27411098f04fc46dcd05/revisions" rel="nofollow noreferrer">https://gist.github.com/samklr/27411098f04fc46dcd05/revisions</a>
  and 
  <a href="https://stackoverflow.com/questions/23402303/apache-spark-moving-average">Apache Spark Moving Average</a>
  but both these codes are written in Scala. Since I'm not familiar with Scala, I'm not able to judge if I'll find it useful or even convert the code to Java.
  Is there any direct implementation of forecasting in Spark Java?</p>