1

我正在尝试运行 ignite 基本示例,但由于 spark TaskNotSerializable 错误而失败。你能帮帮我吗?

val ignite = Ignition.start("/usr/local/ignite/config/example-ignite.xml");
val cfg = ignite.configuration() 
val ic = new IgniteContext[Integer, Integer](sc, () => cfg)
Ignition.setClientMode(true); 

val sharedRdd = ic.fromCache("example")
val x = sqlContext.sparkContext.parallelize(1 to 10000, 10).map(i => (new Integer(i), new Integer(i)))
sharedRdd.savePairs(x)
4

1 回答 1

0

如果您的类未实现为可序列化,那么由于火花也会发生上述异常。为避免此异常,请使您的类可序列化(实现可序列化)

于 2017-07-29T10:47:43.770 回答