Search code examples
javadatabaseperformanceignitefailover

How to initialize and fill Apache Ignite database by first node?


I would like to use Apache Ignite as failover read-only storage so my application will be able to access the most sensitive data if main storage (Oracle) is down.

So I need to

  • Start nodes
  • Create schema (execute DDL queries)
  • Load data from Oracle to Ignite

Seems like it's not the same as database caching and I don't need to use Cache. However, this page says that I need to implement a store to load a large amount of data from 3rd parties.

So, my questions are:

  1. How to effectively transfer data from Oracle to Ignite? Data Streamers?
  2. Who should init this transfer? First started node? How to do that? (tutorials explain how to achieve that via clients, should I follow this advice?)

Solution

  • Actually, I think, use of a cache store without read/write-through would be a suitable option here. You can configure a CacheJdbcPojoStore, for example, and call IgniteCache#loadCache(...) on your cache, once the cluster is up. More on this topic: https://apacheignite.readme.io/docs/3rd-party-store

    If you don't want to use a cache store, then IgniteDataStreamer could be a good choice. This is the fastest way to upload big amount of data to the cluster. Data loading is usually performed from a client node, when all server nodes are up and running.