Class Dump
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump
-
- All Implemented Interfaces:
AutoCloseable
public class Dump extends Object implements AutoCloseable
This class provides the ability to work with saved cache dump.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDump.DumpedPartitionIteratorCloseable dump iterator.
-
Constructor Summary
Constructors Constructor Description Dump(File dumpDir, boolean keepBinary, boolean raw, IgniteLogger log)Dump(File dumpDir, @Nullable String consistentId, boolean keepBinary, boolean raw, @Nullable EncryptionSpi encSpi, IgniteLogger log)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()List<StoredCacheData>configs(String node, int grp)GridKernalContextcontext()FiledumpDirectory()static StringdumpPartFileName(int part, boolean compressed)Dump.DumpedPartitionIteratoriterator(String node, int grp, int part)List<SnapshotMetadata>metadata()List<String>nodesDirectories()List<Integer>partitions(String node, int grp)Iterator<BinaryType>types()
-
-
-
Constructor Detail
-
Dump
public Dump(File dumpDir, boolean keepBinary, boolean raw, IgniteLogger log)
- Parameters:
dumpDir- Dump directory.keepBinary- Iftruethen keep read entries in binary form.raw- Iftruethen keep read entries in form ofKeyCacheObjectandCacheObject.log- Logger.
-
Dump
public Dump(File dumpDir, @Nullable @Nullable String consistentId, boolean keepBinary, boolean raw, @Nullable @Nullable EncryptionSpi encSpi, IgniteLogger log)
- Parameters:
dumpDir- Dump directory.consistentId- If specified, read dump data only for specific node.keepBinary- Iftruethen keep read entries in binary form.raw- Iftruethen keep read entries in form ofKeyCacheObjectandCacheObject.encSpi- Encryption SPI instance.log- Logger.
-
-
Method Detail
-
types
public Iterator<BinaryType> types()
- Returns:
- Binary types iterator.
-
metadata
public List<SnapshotMetadata> metadata()
- Returns:
- List of snapshot metadata saved in
dumpDir.
-
configs
public List<StoredCacheData> configs(String node, int grp)
- Parameters:
node- Node directory name.grp- Group id.- Returns:
- List of cache configs saved in dump for group.
-
partitions
public List<Integer> partitions(String node, int grp)
- Parameters:
node- Node directory name.grp- Group id.- Returns:
- Dump iterator.
-
iterator
public Dump.DumpedPartitionIterator iterator(String node, int grp, int part)
- Parameters:
node- Node directory name.grp- Group id.- Returns:
- Dump iterator.
-
dumpPartFileName
public static String dumpPartFileName(int part, boolean compressed)
- Parameters:
part- Partition number.compressed- Iftruethen compressed partition file.- Returns:
- Dump partition file name.
-
dumpDirectory
public File dumpDirectory()
- Returns:
- Root dump directory.
-
context
public GridKernalContext context()
- Returns:
- Kernal context.
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-