I am using https://apacheignite-mix.readme.io/v1.7/docs/automatic-persistence to load data from database into Ignite cache.
I run my code with Ignite client mode, and want to load the data into Ignite Cluster.
It looks that I have to put my user code jar and dependent jars into $IGNITE_HOME/libs to make my code work?
I would ask:
- Did I do the right thing to put these jars to $IGNITE_HOME/libs to make my code work?
- If I have to put my jars into $IGNITE_HOME/libs, it looks that if I have more tables need to be loaded after I have loaded some tables into the cache, should I have to shutdown the cluster and restart for the server to load these new classes? If so, then the data in the cache will be lost since they reside in memory,and have to reload?
There are two ways to load the data, through
IgniteDataStreamer
and throughCacheStore
implementation. See this page for details: https://apacheignite.readme.io/docs/data-loadingIn case of
IgniteDataStreamer
you will load the data from DB on the client and stream it into the cluster. In this case you don't need to add any classes to server classpath.In case of
CacheStore
you will load data from DB on server side. In this case you need to explicitly deploy (add tolibs
folder) the implementation of theCacheStore
and anything it depends on. If you're using Automatic Persistence, the implementation is already there and nothing to deploy as well.You're never required to have model classes on server classpath and you can dynamically change the schema without cluster restart. See this page for more information: https://apacheignite.readme.io/docs/binary-marshaller