Class CheckpointBarrier
- java.lang.Object
-
- org.apache.flink.runtime.event.AbstractEvent
-
- org.apache.flink.runtime.event.RuntimeEvent
-
- org.apache.flink.runtime.io.network.api.CheckpointBarrier
-
- All Implemented Interfaces:
org.apache.flink.core.io.IOReadableWritable
public class CheckpointBarrier extends RuntimeEvent
Checkpoint barriers are used to align checkpoints throughout the streaming topology. The barriers are emitted by the sources when instructed to do so by the JobManager. When operators receive a CheckpointBarrier on one of its inputs, it knows that this is the point between the pre-checkpoint and post-checkpoint data.Once an operator has received a checkpoint barrier from all its input channels, it knows that a certain checkpoint is complete. It can trigger the operator specific checkpoint behavior and broadcast the barrier to downstream operators.
Depending on the semantic guarantees, may hold off post-checkpoint data until the checkpoint is complete (exactly once).
The checkpoint barrier IDs are strictly monotonous increasing.
-
-
Constructor Summary
Constructors Constructor Description CheckpointBarrier(long id, long timestamp, CheckpointOptions checkpointOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointBarrierasUnaligned()booleanequals(Object other)CheckpointOptionsgetCheckpointOptions()longgetId()longgetTimestamp()inthashCode()booleanisCheckpoint()voidread(org.apache.flink.core.memory.DataInputView in)StringtoString()CheckpointBarrierwithOptions(CheckpointOptions checkpointOptions)voidwrite(org.apache.flink.core.memory.DataOutputView out)
-
-
-
Constructor Detail
-
CheckpointBarrier
public CheckpointBarrier(long id, long timestamp, CheckpointOptions checkpointOptions)
-
-
Method Detail
-
getId
public long getId()
-
getTimestamp
public long getTimestamp()
-
getCheckpointOptions
public CheckpointOptions getCheckpointOptions()
-
withOptions
public CheckpointBarrier withOptions(CheckpointOptions checkpointOptions)
-
write
public void write(org.apache.flink.core.memory.DataOutputView out) throws IOException- Throws:
IOException
-
read
public void read(org.apache.flink.core.memory.DataInputView in) throws IOException- Throws:
IOException
-
isCheckpoint
public boolean isCheckpoint()
-
asUnaligned
public CheckpointBarrier asUnaligned()
-
-