public interface CheckpointStreamFactory
Stream factories can be created from the CheckpointStorageAccess through CheckpointStorageWorkerView.resolveCheckpointStorageLocation(long,
CheckpointStorageLocationReference).
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFastDuplicate(StreamStateHandle stateHandle,
CheckpointedStateScope scope)
Tells if we can duplicate the given
StreamStateHandle into the path corresponding to
the given CheckpointedStateScope. |
default boolean |
couldReuseStateHandle(StreamStateHandle stateHandle)
A pre-check hook before the checkpoint writer want to reuse a state handle, if this returns
false, it is not recommended for the writer to rewrite the state file considering the space
amplification.
|
CheckpointStateOutputStream |
createCheckpointStateOutputStream(CheckpointedStateScope scope)
Creates an new
CheckpointStateOutputStream. |
List<StreamStateHandle> |
duplicate(List<StreamStateHandle> stateHandles,
CheckpointedStateScope scope)
Duplicates
StreamStateHandle into the path corresponding to * the given CheckpointedStateScope. |
default void |
reusePreviousStateHandle(Collection<? extends StreamStateHandle> previousHandle)
A callback method when some previous handle is reused.
|
CheckpointStateOutputStream createCheckpointStateOutputStream(CheckpointedStateScope scope) throws IOException
CheckpointStateOutputStream. When the stream is closed, it returns a
state handle that can retrieve the state back.scope - The state's scope, whether it is exclusive or shared.IOException - Exceptions may occur while creating the stream and should be forwarded.boolean canFastDuplicate(StreamStateHandle stateHandle, CheckpointedStateScope scope) throws IOException
StreamStateHandle into the path corresponding to
the given CheckpointedStateScope.
This should be a rather cheap operation, preferably not involving any remote accesses.
stateHandle - The handle to duplicatescope - Scope determining the location to duplicate intoIOExceptionList<StreamStateHandle> duplicate(List<StreamStateHandle> stateHandles, CheckpointedStateScope scope) throws IOException
StreamStateHandle into the path corresponding to * the given CheckpointedStateScope.
You should first check if you can duplicate with canFastDuplicate(StreamStateHandle, CheckpointedStateScope).
stateHandles - The handles to duplicatescope - Scope determining the location to duplicate intoIOExceptiondefault void reusePreviousStateHandle(Collection<? extends StreamStateHandle> previousHandle)
previousHandle - the previous handles that will be reused.default boolean couldReuseStateHandle(StreamStateHandle stateHandle)
stateHandle - the handle to be reused.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.