Package org.apache.flink.runtime.state
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.int
allocationBaseDirsCount()
Returns the total number of allocation base directories.File
selectAllocationBaseDirectory(int idx)
Returns a specific allocation base directory.File
selectSubtaskBaseDirectory(int idx)
Returns a specific subtask base directory.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.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.
-
-
-
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 byallocationBaseDirectory(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 bysubtaskBaseDirectory(long)
for the same checkpoint id.
-
selectAllocationBaseDirectory
File selectAllocationBaseDirectory(int idx)
Returns a specific allocation base directory. The index must be between 0 (incl.) andallocationBaseDirsCount()
(excl.).
-
selectSubtaskBaseDirectory
File selectSubtaskBaseDirectory(int idx)
Returns a specific subtask base directory. The index must be between 0 (incl.) andallocationBaseDirsCount()
(excl.). This directory is direct a child ofselectSubtaskBaseDirectory(int)
given the same index.
-
allocationBaseDirsCount
int allocationBaseDirsCount()
Returns the total number of allocation base directories.
-
-