Class Dump

  • All Implemented Interfaces:
    AutoCloseable

    public class Dump
    extends Object
    implements AutoCloseable
    This class provides the ability to work with saved cache dump.
    • Constructor Detail

      • Dump

        public Dump​(File dumpDir,
                    boolean keepBinary,
                    boolean raw,
                    IgniteLogger log)
        Parameters:
        dumpDir - Dump directory.
        keepBinary - If true then keep read entries in binary form.
        raw - If true then keep read entries in form of KeyCacheObject and CacheObject.
        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 - If true then keep read entries in binary form.
        raw - If true then keep read entries in form of KeyCacheObject and CacheObject.
        encSpi - Encryption SPI instance.
        log - Logger.
    • Method Detail

      • nodesDirectories

        public List<String> nodesDirectories()
        Returns:
        List of node directories.
      • 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 - If true then compressed partition file.
        Returns:
        Dump partition file name.
      • dumpDirectory

        public File dumpDirectory()
        Returns:
        Root dump directory.