Slava Tutrinov
Slava Tutrinov

Reputation: 1

Apache Ignite Cache ClassNotFoundException

I have an apache ignite cluster.

All nodes are splited to two logical groups: platform level nodes (PLN) and application level nodes (ALN). Each node in cluster has:

ALN contain POJO classes to work with Ignite cache, PLN does not contain this classes and doesn't fit the nodeFilter.

BUT PLN on startup (joining to cluster with ALN) attempt to apply ALN cache configuration and catch ClassNotFoundException related to application POJO classes.

Could ignite server node ignore cache config if it doesn't fit to nodeFilter ?

Upvotes: 0

Views: 1301

Answers (2)

Andrey Mashenkov
Andrey Mashenkov

Reputation: 260

Ignite doesn't need to have Key/Value classes in classpath on server side in the most of cases if binary object concept[1] is used in user code that should be executed on server-side.

However, user classes mentioned in Ignite configuration must be in class path on all nodes. If you need SQL indices and use binary objects, then you can create indices dynamically via SQL query on grid startup.

Please, take a look at BinaryObject concept [1]. Hope it helps.

[1] https://apacheignite.readme.io/docs/binary-marshaller#section-basic-concepts

Upvotes: 0

alamar
alamar

Reputation: 19343

All Ignite nodes need to have all cache configurations in the cluster.

nodeFilter only constraints set of nodes that hold the data for cache. All nodes in the cluster can query any caches, hence they need this information.

You could have two clusters if you wanted, even inside single JVM (per node). This way they won't interact in any way.

Upvotes: 0

Related Questions