Exception in thread "main" java.io.NotSerializableException: com.sam.bigdata.spark.core.test.Task
出现以下错误提示
Exception in thread "main" java.io.NotSerializableException: com.sam.bigdata.spark.core.test.Task
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at com.sam.bigdata.spark.core.test.Driver$.main(Driver.scala:17)
at com.sam.bigdata.spark.core.test.Driver.main(Driver.scala)
解决方法
创建的Task 未序列化,只要序列化即可
- 未序列化之前
- 序列化之后