Interface BootstrapSnapshotStore

All Known Subinterfaces:
ConstructableSnapshotStore, PersistedSnapshotStore, ReceivableSnapshotStore
All Known Implementing Classes:
FileBasedSnapshotStore

public interface BootstrapSnapshotStore
Represent a store, that allows to make copy of existing backups that are targeted at bootstrapping a new partition. A snapshot for bootstrap contains only data that is present in all partitions and does not contain any raft/processing position/index.

One backup can be taken at a time, as only one scaling up operation can be done at a time.

  • Method Details

    • getBootstrapSnapshot

      Optional<PersistedSnapshot> getBootstrapSnapshot()
      Returns:
      the latest snapshot that was copied if present.
    • copyForBootstrap

      ActorFuture<PersistedSnapshot> copyForBootstrap(PersistedSnapshot persistedSnapshot, BiConsumer<Path,Path> copySnapshot)
      Makes a copy of the given snapshot to the given destination folder, keeping only the columns needed for the bootstrap process of a new partition. Any raft related data is removed.

      Only one snapshot for bootstrap can be taken at a time. It will be located into the "bootstrap-snapshots" folder.

      Parameters:
      persistedSnapshot - the persisted snapshot to copy
      copySnapshot - the consumer which copies the snapshot to the destination folder. The first argument is the path of the source snapshot and the second argument is the destination folder
    • deleteBootstrapSnapshots

      ActorFuture<Void> deleteBootstrapSnapshots()
      Returns:
      an ActorFuture which completes when all bootstrap snapshots have been deleted