public class IgniteSnapshotManager extends GridCacheSharedManagerAdapter implements IgniteSnapshot, PartitionsExchangeAware, MetastorageLifecycleListener
These major actions available:
| Modifier and Type | Field and Description |
|---|---|
static String |
CP_SNAPSHOT_REASON
Text Reason for checkpoint to start snapshot operation.
|
static String |
DELTA_SUFFIX
File with delta pages suffix.
|
static String |
DFLT_SNAPSHOT_TMP_DIR
Default snapshot directory for loading remote snapshots.
|
static String |
INDEX_DELTA_NAME
File name template for index delta pages.
|
static String |
PART_DELTA_TEMPLATE
File name template consists of delta pages.
|
static String |
SNAPSHOT_METRICS
Snapshot metrics prefix.
|
static String |
SNP_IN_PROGRESS_ERR_MSG
Snapshot in progress error message.
|
static String |
SNP_NODE_STOPPING_ERR_MSG
Error message to finalize snapshot tasks.
|
static String |
SNP_RUNNING_KEY
Metastorage key to save currently running snapshot.
|
cctx, diagnosticLog, log| Constructor and Description |
|---|
IgniteSnapshotManager(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelLocalSnapshotTask(String name) |
IgniteFuture<Void> |
cancelSnapshot(String name)
Cancel running snapshot operation.
|
IgniteFuture<Void> |
createSnapshot(String name)
Create a consistent copy of all persistence cache groups from the whole cluster.
|
void |
deleteSnapshot(File snpDir,
String folderName) |
boolean |
isSnapshotCreating() |
static boolean |
isSnapshotOperation(DiscoveryEvent evt) |
List<String> |
localSnapshotNames() |
void |
onCacheGroupsStopped(List<Integer> grps) |
void |
onDoneBeforeTopologyUnlock(GridDhtPartitionsExchangeFuture fut)
Callback from exchange process completion; called before topology is unlocked.
|
void |
onReadyForRead(ReadOnlyMetastorage metaStorage)
Is called when metastorage is made ready for read-only operations very early on node startup phase.
|
void |
onReadyForReadWrite(ReadWriteMetastorage metaStorage)
Fully functional metastore capable of performing reading and writing operations.
|
static File |
partDeltaFile(File snapshotCacheDir,
int partId) |
static String |
partDeltaFileName(int partId) |
static File |
resolveSnapshotWorkDirectory(IgniteConfiguration cfg) |
File |
snapshotLocalDir(String snpName) |
File |
snapshotTmpDir() |
protected void |
start0() |
protected void |
stop0(boolean cancel) |
context, isStopping, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, onReconnected, printMemoryStats, start, startInfo, stop, stopInfo, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonDoneAfterTopologyUnlock, onInitAfterTopologyLock, onInitBeforeTopologyLockpublic static final String DELTA_SUFFIX
public static final String PART_DELTA_TEMPLATE
public static final String INDEX_DELTA_NAME
public static final String CP_SNAPSHOT_REASON
public static final String DFLT_SNAPSHOT_TMP_DIR
public static final String SNP_IN_PROGRESS_ERR_MSG
public static final String SNP_NODE_STOPPING_ERR_MSG
public static final String SNP_RUNNING_KEY
public static final String SNAPSHOT_METRICS
public IgniteSnapshotManager(GridKernalContext ctx)
ctx - Kernal context.public static File partDeltaFile(File snapshotCacheDir, int partId)
snapshotCacheDir - Snapshot directory to store files.partId - Cache partition identifier.public static String partDeltaFileName(int partId)
partId - Partition id.protected void start0()
throws IgniteCheckedException
start0 in class GridCacheSharedManagerAdapterIgniteCheckedException - If failed.protected void stop0(boolean cancel)
stop0 in class GridCacheSharedManagerAdaptercancel - Cancel flag.public void deleteSnapshot(File snpDir, String folderName)
snpDir - Snapshot dir.folderName - Local node folder name (see IgniteUtils.maskForFileName(java.lang.CharSequence) with consistent id).public File snapshotLocalDir(String snpName)
snpName - Snapshot name.public File snapshotTmpDir()
public boolean isSnapshotCreating()
True if snapshot operation is in progress.public List<String> localSnapshotNames()
public IgniteFuture<Void> cancelSnapshot(String name)
cancelSnapshot in interface IgniteSnapshotname - Snapshot name to cancel.public void cancelLocalSnapshotTask(String name)
name - Snapshot name to cancel operation on local node.public IgniteFuture<Void> createSnapshot(String name)
createSnapshot in interface IgniteSnapshotname - Snapshot unique name which satisfies the following name pattern [a-zA-Z0-9_].public void onReadyForReadWrite(ReadWriteMetastorage metaStorage) throws IgniteCheckedException
onReadyForReadWrite in interface MetastorageLifecycleListenermetaStorage - Fully functional meta storage.IgniteCheckedExceptionpublic void onReadyForRead(ReadOnlyMetastorage metaStorage) throws IgniteCheckedException
onReadyForRead in interface MetastorageLifecycleListenermetaStorage - Read-only meta storage.IgniteCheckedExceptionpublic static boolean isSnapshotOperation(DiscoveryEvent evt)
evt - Discovery event to check.true if exchange started by snapshot operation.public void onDoneBeforeTopologyUnlock(GridDhtPartitionsExchangeFuture fut)
onDoneBeforeTopologyUnlock in interface PartitionsExchangeAwarefut - Partition map exchange future.public void onCacheGroupsStopped(List<Integer> grps)
grps - List of cache groups which will be destroyed.public static File resolveSnapshotWorkDirectory(IgniteConfiguration cfg)
cfg - Ignite configuration.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021