mesos/spark — pull request #103 by edisontung (2011-12-16 20:04:57+00:00)
Title: Made improvements to takeSample. Also changed SparkLocalKMeans to SparkKMeans

Instead of calling count on an RDD multiple times, stored the count so it can be used. Also, called the collect method for the array earlier also to reduce the number of times count() is called.