Ross Brigoli
Ross Brigoli

Reputation: 696

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

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?

Upvotes: 2

Views: 930

Answers (1)

Valentin Kulichenko
Valentin Kulichenko

Reputation: 8390

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.

Upvotes: 3

Related Questions