Reputation: 33
I have a Hadoop cluster of 5 nodes where Spark runs in yarn-client
mode.
I use --num-executors
for the number of executors. The maximum number of executors I am able to get is 20. Even if I specify more, I get only 20 executors.
Is there any upper limit on the number of executors that can get allocated ? Is it a configuration or the decision is made on the basis of the resources available ?
Upvotes: 2
Views: 1286
Reputation: 8427
Apparently your 20 running executors consume all available memory. You can try decreasing Executor memory with spark.executor.memory
parameter, which should leave a bit more place for other executors to spawn.
Also, are you sure that you correctly set the executors number? You can verify your environment settings from Spark UI view by looking at the spark.executor.instances
value in the Environment tab.
EDIT: As Mateusz Dymczyk pointed out in comments, limited number of executors may not only be caused by overused RAM memory, but also by CPU cores. In both cases the limit comes from the resource manager.
Upvotes: 2