Closed mohsinrasool closed 7 years ago
Hi!
You are using an anonymous class:
graph.foreach(new VoidFunction<Tuple2<Node
the anonymous class actually has a hidden reference to the parent class (CalculateSimilarityGraph2). Hence your CalculateSimilarityGraph2 object will also be serialized to be sent to the cluster...
Two solutions:
Thanks man, I made the CalculateSimilarityGraph2 serializable and it solved the issue.
I am trying to perform some operations on the RDD generated by the KNN Graph classes but I get org.apache.spark.SparkException: Task not serializable error on the same line. I believe, it is because one of the subclass is not serializable.
Anyone have an idea, how can I resolve it, please? My code is below