Interface IStatefulStorage


  • public interface IStatefulStorage
    The interface of all storage classes for checkpoints. For each checkpoint, two types of data are stored: - Component Meta Data (one per component). - Instance Checkpoint Data (one per instance or patition) Each Stateful Storage implementation needs to handle them accordingly.
    • Method Detail

      • close

        void close()
        Closes the Stateful Storage
      • storeComponentMetaData

        void storeComponentMetaData​(CheckpointInfo info,
                                    CheckpointMetadata metadata)
                             throws StatefulStorageException
        Store medata data for component. Ideally in distributed storages this function should only be called once for each component. In local storages, the function should be called by every instance and the data should be stored with the checkpoint data for each partition.
        Parameters:
        info - The information (reference key) for the checkpoint partition.
        metadata - The checkpoint metadata from a component.
        Throws:
        StatefulStorageException
      • dispose

        void dispose​(String oldestCheckpointPreserved,
                     boolean deleteAll)
              throws StatefulStorageException
        Dispose checkpoints.
        Parameters:
        oldestCheckpointPreserved - The oldest checkpoint id to be preserved. All checkpoints before this id should be deleted.
        deleteAll - Ignore the checkpoint Id and delete all checkpoints.
        Throws:
        StatefulStorageException