0
votes

I am developing a Java application that uses Apache Ignite caches with persistent storage.

Since I am still in development, I occasionally need to change some of the cached classes and, when I do this, the Ignite cluster fails to start. At these times, I need to go into my file system and delete the persistent cache.

Is there any way to do this automatically in my program? Ideally, I would like to:

  • Try to start the Ignite cluster
  • If there is some kind of problem
    • destroy the persistent cache
    • try to start the Ignite cluster again

I'd like to do this via Ignite APIs (e.g. not just using Java to delete the files).

How can I do this?

1

1 Answers

1
votes

You will have to remove marshaller/, db/ and wal/ directories via Java file APIs, since Ignite does not have corresponding calls.

In fact it does, but only in tests running code. So you will have to implement it yourself.