Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
    • StreamExecutionEnvironment
    • DataStream
    • Functions
    • State
    • Timer
    • Window
    • Checkpoint
    • Side Outputs
    • Asynchronous I/O
    • Connectors
    • Formats
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink DataStream
  • StreamExecutionEnvironment
  • pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.enable_checkpointing

pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.enable_checkpointing#

StreamExecutionEnvironment.enable_checkpointing(interval: int, mode: CheckpointingMode | None = 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()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.