I have a RDD of vectors. Say the values of the vectors of the RDD is following
1 1 1
2 2 2
3 3 3
I want to convert it to following
1 2 3
1 2 3
1 2 3
Either of the two following vectors is fine with me.
org.apache.spark.util.Vector
org.apache.spark.mllib.linalg.Vector
It can be done locally by converting the RDD into List/Array, for a big data which will become impossible. I found some codes online written for Scala. Any idea how can I do it for Java Spark? I am using Java-7, therefore no lambda expressions.
******I have added a comment regarding why the solutions of the possible duplicate question is not helping me out.