Ignite near cache only deployment - ignite

Is it possible to run Ignite in embedded mode, inside a Java application? So no separate Ignite installation or cluster.
The near cache feature might serve for this purpose, but I haven't found documentation about having a near cache only deployment.

A near cache is a cache of a cache, so it does not make sense to only use a near cache!
But yes, you can embed Ignite. Any Java program with Ignition.start() effectively becomes a node in an Ignite server cluster. In general, it's better to have a separate cluster and have your program just be a client but lots of people do use it embedded.

Related

How to change the Ignite to maintanance mode?

What is Ignite maintenance mode of Ignite, and how to change an ignite to this mode? I was stuck joining the node to the cluster and complains cleaning up the persistent data, however the data can be cleaned (using control.sh) only in the maintenance mode only.
This is a special mode, similar to running Windows in a safe mode after a crash or a data corruption where most of the cluster functionality is disabled and a user is asked to perform some maintenance task to resolve the issue, most straightforward example I can think of is - to clean (remove) some corrupted files on disk just like in your question. You can refer to IEP-53: Maintenance Mode proposal for the details.
I don't think that there is a way to enter this mode manually unless you trigger some preconfigured conditions like stopping a node in the middle of checkpointing with WAL disabled. Once the state is fixed, maintenance mode should be resolved automatically allowing a node to join the cluster.
Also, from my understanding, this mode is about a particular node rather than a complete cluster. I.e. you can have a 4-nodes cluster with only 1 node in maintenance mode, in that case, you have to run control.sh commands locally for the concrete failed node, not from another healthy node. If that's not the case, please provide more details or file a JIRA ticket because reported behavior looks quite broken to me.

Does apache ignite writes to work/marshaller directory, if persistance is not enabled?

I have two different ignite deployments. In both, Apache Ignite server is started from the java program. The program sets work directory, configures the logger and then starts the server.
I have web application (Apache Ignite Client), which connects to respective Apache Ignite Server and performs the operation on cache.
What I am observing is that, in one enviroment some files are created inside work/marshaller directory and in other deployment the marshaller folder is empty.
Persistence is not enabled.
Can anyone explain?
Thanks
Ignite would write to marshaller dir when a corresponding type is used. This is because it is possible to have situation when all nodes which knew what type corresponding to a given typeId has left, and the remaining can no longer make sense of data they possess.

Ignite near cache - Can the same distributed cache be configured to be a near cache in one ignite client & a regular cache in another ignite client?

Folks,
Does anyone know the behavior for the below two items on Ignite Near Cache,
Can the same distributed cache on the ignite grid be configured to be a near cache in one ignite client & a regular cache in another ignite client at the same time?. Hopefully this can be done.
Does near caches work when using SQL queries (we use Spring Data abstraction) or does it work only with JCache based key-value access.
Thanks
lmk
I think you should be able to only start Near Cache on a subset of clients. Have you tried that.
No, SQL map phase will not happen on clients, it will happen on primary server node(s).

Ignite Client connection and Client Cache

I would like to know answers for below questions:
1) In case if Ignite server is restarted, I need to restart the client (web applications). Is there any way client can reconnect to server on server restart. I know when server restarts it allocates a different ID and because of this the current existing connection becomes stale. Is there way to overcome this problem and if so, which version of Ignite supports this feature. Currently I utilize version 1.7
2) Can I have client cache like how Ehcache provides. I don’t want client cache as a front–end to a distributed cache. When I looked at the Near Cache API, it doesn’t have cache name properties like cache configuration and it acts only as a front-end to a distributed cache. Is it possible to create client only cache in Ignite
3) If I have a large object to cache, I find Serialization and Deserialization takes a longer time in Ignite and retrieving from distributed cache is slow. Is there any way we can speed up large objects retrieval from Ignite DataGrid.
This topic is discussed on Apache Ignite users mailing list: http://apache-ignite-users.70518.x6.nabble.com/Questions-on-Client-Reconnect-and-Client-Cache-td10018.html

How to view contents of infinispan cache?

I am using the infinispan cache in a grails project.
Is there any way I can hit a JMX port or anything to see the contents of the cache?
Thanks.
Here are docs for JMX operations. And no, there is no JMX operation that would show all entries.
In local/replicated mode, you can call values() on the cache to get all values, but this is not a recommended operation for production (it does not scale very well). Instead, look on Distributed Executors or Map/Reduce API.