public class FileMergingOperatorStreamStateHandle extends OperatorStreamStateHandle implements CompositeStateHandle
OperatorStreamStateHandle that works for file merging checkpoints.
Operator states are stored in `taskownd/` dir when file merging is enabled. When an operator
state dir is not referenced by any checkpoint, SharedStateRegistry will discard it. The
shared subtask dir of fire merging is also tracked by FileMergingOperatorStreamStateHandle.
The shared subtask dir of file merging is created when task initialization, which will be discarded when no checkpoint refer to it.
StateObject.StateObjectLocation, StateObject.StateObjectSizeStatsCollectorOperatorStateHandle.Mode, OperatorStateHandle.StateMetaInfo| 构造器和说明 |
|---|
FileMergingOperatorStreamStateHandle(DirectoryStreamStateHandle taskOwnedDirHandle,
DirectoryStreamStateHandle sharedDirHandle,
Map<String,OperatorStateHandle.StateMetaInfo> stateNameToPartitionOffsets,
StreamStateHandle delegateStateHandle) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
discardState()
Discards the state referred to and solemnly owned by this handle, to free up resources in the
persistent storage.
|
boolean |
equals(Object o) |
long |
getCheckpointedSize()
Returns the persisted data size during checkpoint execution in bytes.
|
DirectoryStreamStateHandle |
getSharedDirHandle() |
DirectoryStreamStateHandle |
getTaskOwnedDirHandle() |
int |
hashCode() |
void |
registerSharedStates(SharedStateRegistry stateRegistry,
long checkpointId)
Register both newly created and already referenced shared states in the given
SharedStateRegistry. |
String |
toString() |
asBytesIfInMemory, collectSizeStats, getDelegateStateHandle, getStateNameToPartitionOffsets, getStateSize, getStreamStateHandleID, openInputStreamcollectSizeStats, getStateSizepublic FileMergingOperatorStreamStateHandle(DirectoryStreamStateHandle taskOwnedDirHandle, DirectoryStreamStateHandle sharedDirHandle, Map<String,OperatorStateHandle.StateMetaInfo> stateNameToPartitionOffsets, StreamStateHandle delegateStateHandle)
public void registerSharedStates(SharedStateRegistry stateRegistry, long checkpointId)
CompositeStateHandleSharedStateRegistry. This method is called when the checkpoint successfully completes or is
recovered from failures.
After this is completed, newly created shared state is considered as published is no
longer owned by this handle. This means that it should no longer be deleted as part of calls
to StateObject.discardState(). Instead, StateObject.discardState() will trigger an unregistration
from the registry.
registerSharedStates 在接口中 CompositeStateHandlestateRegistry - The registry where shared states are registered.public void discardState()
throws Exception
StateObjectdiscardState 在接口中 StateObjectdiscardState 在类中 OperatorStreamStateHandleExceptionpublic long getCheckpointedSize()
CompositeStateHandleStateObject.getStateSize(). If the size is unknown, this method would return same
result as StateObject.getStateSize().getCheckpointedSize 在接口中 CompositeStateHandlepublic DirectoryStreamStateHandle getSharedDirHandle()
public DirectoryStreamStateHandle getTaskOwnedDirHandle()
public boolean equals(Object o)
equals 在类中 OperatorStreamStateHandlepublic int hashCode()
hashCode 在类中 OperatorStreamStateHandlepublic String toString()
toString 在类中 OperatorStreamStateHandleCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.