无法运行点燃示例

时间:2015-12-12 04:40:33

标签: 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)

1 个答案:

答案 0 :(得分:0)

如果您的类不是Serializable实现,那么由于spark也会发生异常。要避免此异常,请使您的类Serializable(实现Serializable)