...
Create snapshot
[public] Java API
Code Block |
---|
language | java |
---|
theme | Confluence |
---|
title | org.apache.ignite.IgniteSnapshot.java |
---|
collapse | true |
---|
|
public interface IgniteSnapshot {
|
Markdown |
---|
/**
* @return List of all known snapshots.
*/
public List<String> getSnapshots();
/**
* Create a consistent copy of all persistence cache groups from the whole cluster.
*
* @param name Snapshot name.
* @return Future which will be completed when a process ends.
*/
public IgniteFuture<Void> createSnapshot(String name);
} |
[public] JMX MBean
Code Block |
---|
language | java |
---|
theme | Confluence |
---|
title | org.apache.ignite.mxbean.SnapshotMXBean |
---|
collapse | true |
---|
|
package org.apache.ignite.mxbean;
/**
* Snapshot features MBean.
*/
@MXBeanDescription("MBean that provides access for snapshot features.")
public interface SnapshotMXBean {
/**
* Gets all created snapshots on the cluster.
*
* @return List of all known snapshots.
*/
@MXBeanDescription("List of all known snapshots.")
public List<String> getSnapshots();
/**
* Create the cluster-wide snapshot with given name.
*
* @param snpName Snapshot name to created.
* @see IgniteSnapshot#createSnapshot(String) (String)
*/
@MXBeanDescription("Create cluster-wide snapshot.")
public void createSnapshot(@MXBeanParameter(name = "snpName", description = "Snapshot name.") String snpName);
} |
[public] Command Line
Code Block |
---|
# Starts cluster snapshot operation.
control.sh --snapshot ERIB_23012020
# Display all known cluster snapshots.
control.sh --snapshot -list |
[internal] File Transmission
Internal API which allows to request and receive the required snapshot of cache groups from a remote. Used as a part of IEP-28: Rebalance peer-2-peer.
Code Block |
---|
language | java |
---|
theme | Confluence |
---|
title | org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager#createRemoteSnapshot |
---|
collapse | true |
---|
|
/**
* @param parts Collection of pairs group and appropriate cache partition to be snapshot.
* @param rmtNodeId The remote node to connect to.
* @param partConsumer Received partition handler.
* @return Future which will be completed when requested snapshot fully received.
*/
public IgniteInternalFuture<Void> createRemoteSnapshot(
UUID rmtNodeId,
Map<Integer, Set<Integer>> parts,
BiConsumer<File, GroupPartitionId> partConsumer); |
Snapshot creation
Snapshot recovery
...