apache/spark — pull request #1293 by viirya (2014-07-03 17:11:21+00:00)
Title: [SPARK-2355] Add checker for the number of clusters

When the number of clusters given to perform with org.apache.spark.mllib.clustering.KMeans under parallel initial mode is greater than data number, it will throw ArrayIndexOutOfBoundsException.

This PR adds checker for the number of clusters and throws IllegalArgumentException when that number is greater than data number.