I'm trying to set an overall parallelism setting in Flink 1.8.3 in Java as per documentation:
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(4);
Aside from that, I have also setParallelism(2)
calls on the sink and source.
I also can see in the flink UI that the environment setting is applied (long-running session cluster, job submitted via rest API or Flink UI):
but when i have a look at the parallelism the individual stages are running in the Flink UI, they run all with parallelism 1 (aside from source and sink, which are running with the expected parallelism setting):
I already tried also setting the parallelism setting on the individual operators instead, but it did not change anything. the operators are normal flatmaps and filters.
What is not configured right here to have all operators respect the parallelism setting properly? Can't i assume that setting the environment level parallelism will automatically apply this to all operators? I.e. do I need to watch out for other stuff as well when setting parallelism setting?
-p
it will overwrite your default parallelism./bin/flink run -p 10 ../examples/*WordCount-java*.jar
. check also theflink-conf.yaml
file that contains the parameterparallelism.default
. If it is set to1
this is probably the reason. – FelipeStreamExecutionEnvironment
parallelism. – Wolli