Class SavepointLoader
- java.lang.Object
-
- org.apache.flink.state.api.runtime.SavepointLoader
-
@Internal public final class SavepointLoader extends Object
Utility class for loading savepoint metadata and operator state information.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot>loadOperatorStateMetadata(String savepointPath, OperatorIdentifier operatorIdentifier)Loads all state metadata for an operator in a single I/O operation.static org.apache.flink.runtime.checkpoint.metadata.CheckpointMetadataloadSavepointMetadata(String savepointPath)Takes the given string (representing a pointer to a checkpoint) and resolves it to a file status for the checkpoint's metadata file.
-
-
-
Method Detail
-
loadSavepointMetadata
public static org.apache.flink.runtime.checkpoint.metadata.CheckpointMetadata loadSavepointMetadata(String savepointPath) throws IOException
Takes the given string (representing a pointer to a checkpoint) and resolves it to a file status for the checkpoint's metadata file.This should only be used when the user code class loader is the current classloader for the thread.
- Parameters:
savepointPath- The path to an external savepoint.- Returns:
- A state handle to savepoint's metadata.
- Throws:
IOException- Thrown, if the path cannot be resolved, the file system not accessed, or the path points to a location that does not seem to be a savepoint.
-
loadOperatorStateMetadata
public static Map<String,org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> loadOperatorStateMetadata(String savepointPath, OperatorIdentifier operatorIdentifier) throws IOException
Loads all state metadata for an operator in a single I/O operation.- Parameters:
savepointPath- Path to the savepoint directoryoperatorIdentifier- Operator UID or hash- Returns:
- Map from state name to StateMetaInfoSnapshot
- Throws:
IOException- If reading fails
-
-