public interface StatefulTask<T extends StateHandle<?>>
Modifier and Type | Method and Description |
---|---|
void |
notifyCheckpointComplete(long checkpointId)
Invoked when a checkpoint has been completed, i.e., when the checkpoint coordinator has received
the notification from all participating tasks.
|
void |
setInitialState(T stateHandle,
long recoveryTimestamp)
Sets the initial state of the operator, upon recovery.
|
boolean |
triggerCheckpoint(long checkpointId,
long timestamp)
This method is either called directly and asynchronously by the checkpoint
coordinator (in the case of functions that are directly notified - usually
the data sources), or called synchronously when all incoming channels have
reported a checkpoint barrier.
|
void setInitialState(T stateHandle, long recoveryTimestamp) throws Exception
stateHandle
- The handle to the state.recoveryTimestamp
- Global recovery timestamp.Exception
boolean triggerCheckpoint(long checkpointId, long timestamp) throws Exception
checkpointId
- The ID of the checkpoint, incrementing.timestamp
- The timestamp when the checkpoint was triggered at the JobManager.false
if the checkpoint can not be carried out, true
otherwiseException
void notifyCheckpointComplete(long checkpointId) throws Exception
checkpointId
- The ID of the checkpoint that is complete..Exception
- The notification method may forward its exceptions.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.