0
votes

I am new to Ignite. I have understood about basics of CacheConfiguration and IgniteCache. I have used SqlQuery API by annotating fields with @QuerySqlField in POJO and by setting setIndexedTypes() on my cache configuration. I got to know about ignite-schema-import which reads schema of the database and creates POJOS and a CacheConfig.java which has queryEntity() and JdbcType(). How can I make use of this two methods(queryEntity() and JdbcType()) to configure ignite cache, any code samples are much appreciated.

Actually, I am using JPA to connect to DB. Is there a possibility to tweak ignite-schema-import to make my POJO's JPA compliant. If yes then where should i look into.

1

1 Answers

2
votes

The main purpose of ignite-schema-import utility is to help users migrate from RDBMs to Ignite without need to write a lot code by hand.

As for JPA on generated POJOs - you may submit a Pull Request with this feature (or create your own fork).

Also it may be interesting for you to take a look at Web Console It has much more advanced model import from database than Ignite Schema Import Utility.

  1. Register on web console.
  2. Create sample cluster on "Clusters screen".
  3. Go to "Models screen".
  4. Click import from database.
  5. You will asked to download web-agent. Download, unzip, copy JDBC driver to agent "jdbc-drivers" folder and start it.
  6. Return to Web console - and enter JDBC URL + credetials.
  7. Select schemas and tables to import and import.
  8. Go to "Summary screen" and download "ready to play" project with all configs, java files and pom.xml