Task not serializable exception

2015-02-24 Thread Kartheek.R
Hi, I run into Task not Serializable excption with following code below. When I remove the threads and run, it works, but with threads I run into Task not serializable exception. object SparkKart extends Serializable{ def parseVector(line: String): Vector[Double] = { DenseVector(line.split

Re: Task not serializable exception

2015-02-23 Thread Kartheek.R
} } -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Task-not-serializable-exception-tp21776p21778.html Sent from the Apache Spark User List mailing list archive at Nabble.com

Task not serializable exception

2015-02-23 Thread Kartheek.R
() { val dist1 =data.map(x = squaredDistance(x,kPoints(0))) } }) thread1.start I am facing Task not serializable exception: Exception in thread Thread-32 org.apache.spark.SparkException: Task not serializable at org.apache.spark.util.ClosureCleaner