Ignite grid name thread local must be set or this method should be accessed under org.apache.ignite.thread.IgniteThread

不羁岁月 提交于 2019-12-14 02:06:35

问题


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?


回答1:


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.


Clarification:

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.



来源:https://stackoverflow.com/questions/43545956/ignite-grid-name-thread-local-must-be-set-or-this-method-should-be-accessed-unde

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!