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 of
LocalSnapshotDirectoryProvider.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLocalSnapshotDirectoryProviderImpl(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
Modifier and TypeMethodDescriptionallocationBaseDirectory(long checkpointId) Returns the local state allocation base directory for given checkpoint id w.r.t. our rotation over all available allocation base directories.intReturns the total number of allocation base directories.selectAllocationBaseDirectory(int idx) Returns a specific allocation base directory.selectSubtaskBaseDirectory(int idx) Returns a specific subtask base directory.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.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.toString()
-
Constructor Details
-
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 Details
-
allocationBaseDirectory
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
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
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
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
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
-
toString
-