Click on Javadoc link to open Javadoc documentation.
Package
org.gridgain.grid.spi.checkpoint.sharedfs Javadoc![]()
Description
GridSharedFsCheckpointSpi Javadoc
uses shared file system directory to store checkpoints. All checkpoints are stored on shared storage and available for all nodes in grid. Note that every node must have access to the shared directory. The reason the directory needs to be shared is because a job state can be saved on one node and loaded on another (e.g. if a job gets re-executed on a different node after node failure). When started, this SPI tracks all checkpoints saved by localhost for expiration. Note that SPI does not cache data stored in checkpoints - all the data is loaded from file system on demand.
| Configuration Directory Directory path for shared checkpoints should either be empty or contain previously stored checkpoint files. |
Configuration
The following configuration parameters can be used to configure GridSharedFsCheckpointSpi Javadoc
:
| Setter Method | Description | Optional | Default |
|---|---|---|---|
| setDirectoryPath(String) Javadoc |
Sets directory path to the shared folder where checkpoints are stored. The path can either be absolute of relative to to the path specified in GRIDGAIN_HOME environment or system varialble. | Yes | GRIDGAIN_HOME/work/checkpoint/sharedfs |
Note that GridConfiguration ![]()
Examples
GridSharedFsCheckpointSpi can be configured as follows:
GridSharedFsCheckpointSpi checkpointSpi = new GridSharedFsCheckpointSpi(); // Override default directory path. checkpointSpi.setDirectoryPath("/my/directory/path"); GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Override default checkpoint SPI. cfg.setCheckpointSpi(checkpointSpi); // Start grid. GridFactory.start(cfg);
or from Spring configuration file:
<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfigurationAdapter" singleton="true"> ... <property name="checkpointSpi"> <bean class="org.gridgain.grid.spi.checkpoint.sharedfs.GridSharedFsCheckpointSpi"> <!-- Change to shared directory path in your environment. --> <property name="directoryPath" value="/my/directory/path"/> </bean> </property> ... </bean>

For more information about using Spring framework for configuration click here.
