Package org.apache.flink.state.changelog
Class AbstractChangelogStateBackend
- java.lang.Object
-
- org.apache.flink.state.changelog.AbstractChangelogStateBackend
-
- All Implemented Interfaces:
Serializable
,DelegatingStateBackend
,StateBackend
- Direct Known Subclasses:
ChangelogStateBackend
,DeactivatedChangelogStateBackend
@Internal public abstract class AbstractChangelogStateBackend extends Object implements DelegatingStateBackend, StateBackend
An abstract base implementation of theStateBackend
interface whose subclasses use delegatedStateBackend and State changes to restore.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.state.StateBackend
StateBackend.CustomInitializationMetrics, StateBackend.KeyedStateBackendParameters<K>, StateBackend.OperatorStateBackendParameters
-
-
Field Summary
Fields Modifier and Type Field Description protected StateBackend
delegatedStateBackend
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.state.delegate.DelegatingStateBackend
getName
-
Methods inherited from interface org.apache.flink.runtime.state.StateBackend
createAsyncKeyedStateBackend, supportsAsyncKeyedStateBackend, supportsNoClaimRestoreMode
-
-
-
-
Field Detail
-
delegatedStateBackend
protected final StateBackend delegatedStateBackend
-
-
Method Detail
-
createKeyedStateBackend
public <K> CheckpointableKeyedStateBackend<K> createKeyedStateBackend(StateBackend.KeyedStateBackendParameters<K> parameters) throws Exception
Description copied from interface:StateBackend
Creates a newCheckpointableKeyedStateBackend
that is responsible for holding keyed state and checkpointing it.Keyed State is state where each value is bound to a key.
- Specified by:
createKeyedStateBackend
in interfaceStateBackend
- Type Parameters:
K
- The type of the keys by which the state is organized.- Parameters:
parameters
- The arguments bundle for creatingCheckpointableKeyedStateBackend
.- Returns:
- The Keyed State Backend for the given job, operator, and key group range.
- Throws:
Exception
- This method may forward all exceptions that occur while instantiating the backend.
-
createOperatorStateBackend
public OperatorStateBackend createOperatorStateBackend(StateBackend.OperatorStateBackendParameters parameters) throws Exception
Description copied from interface:StateBackend
Creates a newOperatorStateBackend
that can be used for storing operator state.Operator state is state that is associated with parallel operator (or function) instances, rather than with keys.
- Specified by:
createOperatorStateBackend
in interfaceStateBackend
- Parameters:
parameters
- The arguments bundle for creatingOperatorStateBackend
.- Returns:
- The OperatorStateBackend for operator identified by the job and operator identifier.
- Throws:
Exception
- This method may forward all exceptions that occur while instantiating the backend.
-
useManagedMemory
public boolean useManagedMemory()
Description copied from interface:StateBackend
Whether the state backend uses Flink's managed memory.- Specified by:
useManagedMemory
in interfaceStateBackend
-
getDelegatedStateBackend
public StateBackend getDelegatedStateBackend()
- Specified by:
getDelegatedStateBackend
in interfaceDelegatingStateBackend
-
supportsSavepointFormat
public boolean supportsSavepointFormat(SavepointFormatType formatType)
- Specified by:
supportsSavepointFormat
in interfaceStateBackend
-
restore
protected abstract <K> CheckpointableKeyedStateBackend<K> restore(Environment env, String operatorIdentifier, KeyGroupRange keyGroupRange, TtlTimeProvider ttlTimeProvider, MetricGroup metricGroup, Collection<ChangelogStateBackendHandle> stateBackendHandles, ChangelogBackendRestoreOperation.BaseBackendBuilder<K> baseBackendBuilder) throws Exception
- Throws:
Exception
-
-