An Ignite cluster can be in one of the three states:
When you start a pure in-memory cluster (no persistent data regions) for the first time, the cluster is in the
When you start a cluster with persistent data regions for the first time, the cluster is
INACTIVE: All operations are prohibited.
When you change the cluster state from active to
INACTIVE(deactivation), the cluster deallocates all memory resources.Warning
Deactivation deallocates all memory resources, including your application data, on all cluster nodes and disables public cluster API. If you have in-memory caches that are not backed up by a persistent storage (neither native persistent storage nor external storage), you will lose the data and will have to repopulate these caches. The non-persistent system caches are cleared too.
ACTIVE: This is the normal mode of the cluster. You can execute any operation.
ACTIVE_READ_ONLY: The read-only mode. Only read operations are allowed.
Any attempt to create a cache or modify the data in an existing cache results in an
IgniteClusterReadOnlyExceptionexception. DDL or DML statements that modify the data are prohibited as well.
Changing Cluster State
You can change the cluster state in multiple ways:
control.sh --set-state ACTIVE_READ_ONLY
Ignite ignite = Ignition.start(); ignite.cluster().state(ClusterState.ACTIVE_READ_ONLY);
- Mbean’s Object Name:
Get the current cluster state.
Set the cluster state.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.