Interface LocalSnapshotDirectoryProvider

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    LocalSnapshotDirectoryProviderImpl

    public interface LocalSnapshotDirectoryProvider
    extends Serializable
    Provides directories for local backup or local recovery. It offers access to the allocation base directories (i.e. the root directories for all local state that is created under the same allocation id) and the subtask-specific paths, which contain the local state for one subtask. Access by checkpoint id rotates over all root directory indexes, in case that there is more than one. Selection methods are provided to pick the directory under a certain index. Directory structures are of the following shape:

     |-----allocationBaseDirectory------|
     |-----subtaskBaseDirectory--------------------------------------|
     |-----subtaskSpecificCheckpointDirectory------------------------------|
    
     ../local_state_root_1/allocation_id/job_id/vertex_id_subtask_idx/chk_1/(state)
     ../local_state_root_2/allocation_id/job_id/vertex_id_subtask_idx/chk_2/(state)
    
     (...)
     

    • Method Detail

      • allocationBaseDirectory

        File allocationBaseDirectory​(long checkpointId)
        Returns the local state allocation base directory for given checkpoint id w.r.t. our rotation over all available allocation base directories.
      • subtaskBaseDirectory

        File subtaskBaseDirectory​(long checkpointId)
        Returns the local state directory for the owning subtask the given checkpoint id w.r.t. our rotation over all available available allocation base directories. This directory is contained in the directory returned by allocationBaseDirectory(long) for the same checkpoint id.
      • subtaskSpecificCheckpointDirectory

        File subtaskSpecificCheckpointDirectory​(long checkpointId)
        Returns the local state directory for the specific operator subtask and the given checkpoint id w.r.t. our rotation over all available root dirs. This directory is contained in the directory returned by subtaskBaseDirectory(long) for the same checkpoint id.
      • selectAllocationBaseDirectory

        File selectAllocationBaseDirectory​(int idx)
        Returns a specific allocation base directory. The index must be between 0 (incl.) and allocationBaseDirsCount() (excl.).
      • allocationBaseDirsCount

        int allocationBaseDirsCount()
        Returns the total number of allocation base directories.