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:
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 CheckpointBarrier
asUnaligned()
boolean
equals(Object other)
CheckpointOptions
getCheckpointOptions()
long
getId()
long
getTimestamp()
int
hashCode()
boolean
isCheckpoint()
void
read(DataInputView in)
Reads the object's internal data from the given data input view.String
toString()
CheckpointBarrier
withOptions(CheckpointOptions checkpointOptions)
void
write(DataOutputView out)
Writes the object's internal data to the given data output view.
-
-
-
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(DataOutputView out) throws IOException
Description copied from interface:IOReadableWritable
Writes the object's internal data to the given data output view.- Parameters:
out
- the output view to receive the data.- Throws:
IOException
- thrown if any error occurs while writing to the output stream
-
read
public void read(DataInputView in) throws IOException
Description copied from interface:IOReadableWritable
Reads the object's internal data from the given data input view.- Parameters:
in
- the input view to read the data from- Throws:
IOException
- thrown if any error occurs while reading from the input stream
-
isCheckpoint
public boolean isCheckpoint()
-
asUnaligned
public CheckpointBarrier asUnaligned()
-
-