Configuring PyFlink applications

Based on the requirements of your PyFlink application, you can optimize the program with different configuration options.

You can configure the Flink application with Python API by setting the options as shown in the following example:
from pyflink.common import Configuration
from pyflink.datastream import StreamExecutionEnvironment

config = Configuration()
config.set_integer("python.fn-execution.bundle.size", 1000)
env = StreamExecutionEnvironment.get_execution_environment(config)

The configuration you set in the Flink application affects the Python runtime and how the different processes should be executed. The Flink job related configurations should be set when submiting the Flink job. For the list of Pything configurations, see the Python options section in the Apache Flink documentation. For more information about submitting a Flink job with options, see the Submitting PyFlink jobs section in the Apache Flink documentation.