SPARK RDD - Clustering - K-Means
This is well answered in this earlier question:

https://stackoverflow.com/q/31447141/1060350

Beware that Spark k-means is slow. 

If your data fits into main memory (i.e. a few gigabyte, which means billions of vectors!) then other tools such as ELKI that don't have the cluster overhead will be much faster. Use spark only for preprocessing the data, if you e.g. have several TB of jsons, and you need to first extract the numbers out of the JSONs, then here is where Spark shines. 

Once your data is then vectors, use ELKI instead, it's much faster.