问题描述
此错误是什么意思?我正在尝试从Apache Spark映射函数中检索Ignite缓存.
What does this error mean? I am trying to retrieve an Ignite cache from within the Apache Spark map function.
我在这里想念任何东西吗?
Did I miss anything here?
推荐答案
最有可能将 Ignite
或 IgniteCache
实例序列化并与该函数一起发送给执行程序.您应该避免这种情况,并使用 Ignition
在本地获取 Ignite
.
Most likely Ignite
or IgniteCache
instance was serialized and sent to executor along with the function. You should avoid this and acquire Ignite
locally using Ignition
.
说明:
可以在Ignite线程的上下文中成功反序列化Ignite实例,因此使用Ignite计算可以正常工作.但是在这种情况下是Spark并且将Ignite发送给执行者是错误的.事实上,不能保证它在那里存在,因此应该始终使用Ignition在Spark执行器上正确获取或创建客户端节点.
Ignite instance can be successfully deserialized in context of Ignite thread, so with Ignite computations it works fine. But in this case it's Spark and sending Ignite to executor is wrong. As a matter of fact, there is no guarantee it even exists there, so one should always use Ignition to properly get or create client node on a Spark executor.
这篇关于必须设置Ignite网格名称线程本地,否则应在org.apache.ignite.thread.IgniteThread下访问此方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!