Class 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 Detail

      • CheckpointBarrier

        public CheckpointBarrier​(long id,
                                 long timestamp,
                                 CheckpointOptions checkpointOptions)
    • Method Detail

      • getId

        public long getId()
      • getTimestamp

        public long getTimestamp()
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isCheckpoint

        public boolean isCheckpoint()