Package org.apache.flink.runtime.state
Class LocalSnapshotDirectoryProviderImpl
- java.lang.Object
-
- org.apache.flink.runtime.state.LocalSnapshotDirectoryProviderImpl
-
- All Implemented Interfaces:
Serializable
,LocalSnapshotDirectoryProvider
public class LocalSnapshotDirectoryProviderImpl extends Object implements LocalSnapshotDirectoryProvider
Implementation ofLocalSnapshotDirectoryProvider
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LocalSnapshotDirectoryProviderImpl(File[] allocationBaseDirs, org.apache.flink.api.common.JobID jobID, JobVertexID jobVertexID, int subtaskIndex)
LocalSnapshotDirectoryProviderImpl(File allocationBaseDir, org.apache.flink.api.common.JobID jobID, JobVertexID jobVertexID, int subtaskIndex)
-
Method Summary
All Methods Instance Methods Concrete 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.String
toString()
-
-
-
Constructor Detail
-
LocalSnapshotDirectoryProviderImpl
public LocalSnapshotDirectoryProviderImpl(File allocationBaseDir, @Nonnull org.apache.flink.api.common.JobID jobID, @Nonnull JobVertexID jobVertexID, @Nonnegative int subtaskIndex)
-
LocalSnapshotDirectoryProviderImpl
public LocalSnapshotDirectoryProviderImpl(@Nonnull File[] allocationBaseDirs, @Nonnull org.apache.flink.api.common.JobID jobID, @Nonnull JobVertexID jobVertexID, @Nonnegative int subtaskIndex)
-
-
Method Detail
-
allocationBaseDirectory
public File allocationBaseDirectory(long checkpointId)
Description copied from interface:LocalSnapshotDirectoryProvider
Returns the local state allocation base directory for given checkpoint id w.r.t. our rotation over all available allocation base directories.- Specified by:
allocationBaseDirectory
in interfaceLocalSnapshotDirectoryProvider
-
subtaskBaseDirectory
public File subtaskBaseDirectory(long checkpointId)
Description copied from interface:LocalSnapshotDirectoryProvider
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 byLocalSnapshotDirectoryProvider.allocationBaseDirectory(long)
for the same checkpoint id.- Specified by:
subtaskBaseDirectory
in interfaceLocalSnapshotDirectoryProvider
-
subtaskSpecificCheckpointDirectory
public File subtaskSpecificCheckpointDirectory(long checkpointId)
Description copied from interface:LocalSnapshotDirectoryProvider
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 byLocalSnapshotDirectoryProvider.subtaskBaseDirectory(long)
for the same checkpoint id.- Specified by:
subtaskSpecificCheckpointDirectory
in interfaceLocalSnapshotDirectoryProvider
-
selectAllocationBaseDirectory
public File selectAllocationBaseDirectory(int idx)
Description copied from interface:LocalSnapshotDirectoryProvider
Returns a specific allocation base directory. The index must be between 0 (incl.) andLocalSnapshotDirectoryProvider.allocationBaseDirsCount()
(excl.).- Specified by:
selectAllocationBaseDirectory
in interfaceLocalSnapshotDirectoryProvider
-
selectSubtaskBaseDirectory
public File selectSubtaskBaseDirectory(int idx)
Description copied from interface:LocalSnapshotDirectoryProvider
Returns a specific subtask base directory. The index must be between 0 (incl.) andLocalSnapshotDirectoryProvider.allocationBaseDirsCount()
(excl.). This directory is direct a child ofLocalSnapshotDirectoryProvider.selectSubtaskBaseDirectory(int)
given the same index.- Specified by:
selectSubtaskBaseDirectory
in interfaceLocalSnapshotDirectoryProvider
-
allocationBaseDirsCount
public int allocationBaseDirsCount()
Description copied from interface:LocalSnapshotDirectoryProvider
Returns the total number of allocation base directories.- Specified by:
allocationBaseDirsCount
in interfaceLocalSnapshotDirectoryProvider
-
-