SANSA-Stack/Archived-SANSA-Examples

PageRank example -- object not serializable

earthquakesan opened this issue · 0 comments

app_1  | Exception in thread "main" org.apache.spark.SparkException: Task not serializable
app_1  | 	at org.apache.spark.util.ClosureCleaner$.ensureSerializable(ClosureCleaner.scala:298)
app_1  | 	at org.apache.spark.util.ClosureCleaner$.org$apache$spark$util$ClosureCleaner$$clean(ClosureCleaner.scala:288)
app_1  | 	at org.apache.spark.util.ClosureCleaner$.clean(ClosureCleaner.scala:108)
app_1  | 	at org.apache.spark.SparkContext.clean(SparkContext.scala:2101)
app_1  | 	at org.apache.spark.rdd.RDD$$anonfun$map$1.apply(RDD.scala:370)
app_1  | 	at org.apache.spark.rdd.RDD$$anonfun$map$1.apply(RDD.scala:369)
app_1  | 	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
app_1  | 	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
app_1  | 	at org.apache.spark.rdd.RDD.withScope(RDD.scala:362)
app_1  | 	at org.apache.spark.rdd.RDD.map(RDD.scala:369)
app_1  | 	at net.sansa_stack.rdf.spark.model.GraphXGraphOps$class.makeGraph(GraphXGraphOps.scala:58)
app_1  | 	at net.sansa_stack.rdf.spark.model.JenaSparkGraphXOps$$anon$2.makeGraph(JenaSparkRDD.scala:43)
app_1  | 	at net.sansa_stack.examples.spark.rdf.PageRank$.main(PageRank.scala:48)
app_1  | 	at net.sansa_stack.examples.spark.rdf.PageRank.main(PageRank.scala)
app_1  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
app_1  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
app_1  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
app_1  | 	at java.lang.reflect.Method.invoke(Method.java:498)
app_1  | 	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:743)
app_1  | 	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)
app_1  | 	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
app_1  | 	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
app_1  | 	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
app_1  | Caused by: java.io.NotSerializableException: net.sansa_stack.rdf.spark.model.JenaSparkGraphXOps$$anon$2
app_1  | Serialization stack:
app_1  | 	- object not serializable (class: net.sansa_stack.rdf.spark.model.JenaSparkGraphXOps$$anon$2, value: net.sansa_stack.rdf.spark.model.JenaSparkGraphXOps$$anon$2@1e1b061)
app_1  | 	- field (class: net.sansa_stack.rdf.spark.model.GraphXGraphOps$$anonfun$3, name: $outer, type: interface net.sansa_stack.rdf.spark.model.GraphXGraphOps)
app_1  | 	- object (class net.sansa_stack.rdf.spark.model.GraphXGraphOps$$anonfun$3, <function1>)
app_1  | 	at org.apache.spark.serializer.SerializationDebugger$.improveException(SerializationDebugger.scala:40)
app_1  | 	at org.apache.spark.serializer.JavaSerializationStream.writeObject(JavaSerializer.scala:46)
app_1  | 	at org.apache.spark.serializer.JavaSerializerInstance.serialize(JavaSerializer.scala:100)
app_1  | 	at org.apache.spark.util.ClosureCleaner$.ensureSerializable(ClosureCleaner.scala:295)
app_1  | 	... 22 more