pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment.set_parallelism#
- StreamExecutionEnvironment.set_parallelism(parallelism: int) pyflink.datastream.stream_execution_environment.StreamExecutionEnvironment [source]#
Sets the parallelism for operations executed through this environment. Setting a parallelism of x here will cause all operators (such as map, batchReduce) to run with x parallel instances. This method overrides the default parallelism for this environment. The LocalStreamEnvironment uses by default a value equal to the number of hardware contexts (CPU cores / threads). When executing the program via the command line client from a JAR file, the default degree of parallelism is the one configured for that setup.
- Parameters
parallelism – The parallelism.
- Returns
This object.