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 FileallocationBaseDirectory(long checkpointId)Returns the local state allocation base directory for given checkpoint id w.r.t. our rotation over all available allocation base directories.intallocationBaseDirsCount()Returns the total number of allocation base directories.FileselectAllocationBaseDirectory(int idx)Returns a specific allocation base directory.FileselectSubtaskBaseDirectory(int idx)Returns a specific subtask base directory.FilesubtaskBaseDirectory(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.FilesubtaskSpecificCheckpointDirectory(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.StringtoString()
-
-
-
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:LocalSnapshotDirectoryProviderReturns the local state allocation base directory for given checkpoint id w.r.t. our rotation over all available allocation base directories.- Specified by:
allocationBaseDirectoryin interfaceLocalSnapshotDirectoryProvider
-
subtaskBaseDirectory
public File subtaskBaseDirectory(long checkpointId)
Description copied from interface:LocalSnapshotDirectoryProviderReturns 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:
subtaskBaseDirectoryin interfaceLocalSnapshotDirectoryProvider
-
subtaskSpecificCheckpointDirectory
public File subtaskSpecificCheckpointDirectory(long checkpointId)
Description copied from interface:LocalSnapshotDirectoryProviderReturns 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:
subtaskSpecificCheckpointDirectoryin interfaceLocalSnapshotDirectoryProvider
-
selectAllocationBaseDirectory
public File selectAllocationBaseDirectory(int idx)
Description copied from interface:LocalSnapshotDirectoryProviderReturns a specific allocation base directory. The index must be between 0 (incl.) andLocalSnapshotDirectoryProvider.allocationBaseDirsCount()(excl.).- Specified by:
selectAllocationBaseDirectoryin interfaceLocalSnapshotDirectoryProvider
-
selectSubtaskBaseDirectory
public File selectSubtaskBaseDirectory(int idx)
Description copied from interface:LocalSnapshotDirectoryProviderReturns 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:
selectSubtaskBaseDirectoryin interfaceLocalSnapshotDirectoryProvider
-
allocationBaseDirsCount
public int allocationBaseDirsCount()
Description copied from interface:LocalSnapshotDirectoryProviderReturns the total number of allocation base directories.- Specified by:
allocationBaseDirsCountin interfaceLocalSnapshotDirectoryProvider
-
-