Thanks Derrick, when I count the unique terms it is very small. So I added
this...

val tfidf_features = lines.flatMap(x => x._2.split(" ").filter(_.length >
2)).distinct().count().toInt
val hashingTF = new HashingTF(tfidf_features)



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/KMeans-with-large-clusters-Java-Heap-Space-tp21432p22153.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to