Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
    • StreamExecutionEnvironment
    • DataStream
    • Functions
    • State
    • Timer
    • Window
    • Checkpoint
    • Side Outputs
    • Connectors
    • Formats
  • PyFlink Common

pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.enable_checkpointing#

StreamExecutionEnvironment.enable_checkpointing(interval: int, mode: Optional[CheckpointingMode] = None) → StreamExecutionEnvironment[source]#

Enables checkpointing for the streaming job. The distributed state of the streaming dataflow will be periodically snapshotted. In case of a failure, the streaming dataflow will be restarted from the latest completed checkpoint.

The job draws checkpoints periodically, in the given interval. The system uses the given CheckpointingMode for the checkpointing (“exactly once” vs “at least once”). The state will be stored in the configured state backend.

Note

Checkpointing iterative streaming dataflows in not properly supported at the moment. For that reason, iterative jobs will not be started if used with enabled checkpointing.

Example:

>>> env.enable_checkpointing(300000, CheckpointingMode.AT_LEAST_ONCE)
Parameters
  • interval – Time interval between state checkpoints in milliseconds.

  • mode – The checkpointing mode, selecting between “exactly once” and “at least once” guaranteed.

Returns

This object.

previous

pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.get_checkpoint_config

next

pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.get_checkpoint_interval

On this page
  • StreamExecutionEnvironment.enable_checkpointing()
Show Source

Created using Sphinx 5.3.0.