问题
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