implementation of approximate k-means clustering in Spark