Package org.apache.flink.runtime.state
Class LocalRecoveryDirectoryProviderImpl
- java.lang.Object
-
- org.apache.flink.runtime.state.LocalRecoveryDirectoryProviderImpl
-
- All Implemented Interfaces:
Serializable,LocalRecoveryDirectoryProvider
public class LocalRecoveryDirectoryProviderImpl extends Object implements LocalRecoveryDirectoryProvider
Implementation ofLocalRecoveryDirectoryProvider.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LocalRecoveryDirectoryProviderImpl(File[] allocationBaseDirs, org.apache.flink.api.common.JobID jobID, JobVertexID jobVertexID, int subtaskIndex)LocalRecoveryDirectoryProviderImpl(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.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.FilesubtaskSpecificCheckpointDirectory(long checkpointId)Returns the local state directory for the specific operator subtask and the given checkpoint id w.r.t.StringtoString()
-
-
-
Constructor Detail
-
LocalRecoveryDirectoryProviderImpl
public LocalRecoveryDirectoryProviderImpl(File allocationBaseDir, @Nonnull org.apache.flink.api.common.JobID jobID, @Nonnull JobVertexID jobVertexID, @Nonnegative int subtaskIndex)
-
LocalRecoveryDirectoryProviderImpl
public LocalRecoveryDirectoryProviderImpl(@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:LocalRecoveryDirectoryProviderReturns the local state allocation base directory for given checkpoint id w.r.t. our rotation over all available allocation base directories.- Specified by:
allocationBaseDirectoryin interfaceLocalRecoveryDirectoryProvider
-
subtaskBaseDirectory
public File subtaskBaseDirectory(long checkpointId)
Description copied from interface:LocalRecoveryDirectoryProviderReturns 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 byLocalRecoveryDirectoryProvider.allocationBaseDirectory(long)for the same checkpoint id.- Specified by:
subtaskBaseDirectoryin interfaceLocalRecoveryDirectoryProvider
-
subtaskSpecificCheckpointDirectory
public File subtaskSpecificCheckpointDirectory(long checkpointId)
Description copied from interface:LocalRecoveryDirectoryProviderReturns 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 byLocalRecoveryDirectoryProvider.subtaskBaseDirectory(long)for the same checkpoint id.- Specified by:
subtaskSpecificCheckpointDirectoryin interfaceLocalRecoveryDirectoryProvider
-
selectAllocationBaseDirectory
public File selectAllocationBaseDirectory(int idx)
Description copied from interface:LocalRecoveryDirectoryProviderReturns a specific allocation base directory. The index must be between 0 (incl.) andLocalRecoveryDirectoryProvider.allocationBaseDirsCount()(excl.).- Specified by:
selectAllocationBaseDirectoryin interfaceLocalRecoveryDirectoryProvider
-
selectSubtaskBaseDirectory
public File selectSubtaskBaseDirectory(int idx)
Description copied from interface:LocalRecoveryDirectoryProviderReturns a specific subtask base directory. The index must be between 0 (incl.) andLocalRecoveryDirectoryProvider.allocationBaseDirsCount()(excl.). This directory is direct a child ofLocalRecoveryDirectoryProvider.selectSubtaskBaseDirectory(int)given the same index.- Specified by:
selectSubtaskBaseDirectoryin interfaceLocalRecoveryDirectoryProvider
-
allocationBaseDirsCount
public int allocationBaseDirsCount()
Description copied from interface:LocalRecoveryDirectoryProviderReturns the total number of allocation base directories.- Specified by:
allocationBaseDirsCountin interfaceLocalRecoveryDirectoryProvider
-
-