Do Spark's stages within a job run in parallel?
I know that within a job in Spark, multiple stages could be running in parallel, but when I checked, it seems like the executors are doing a context switch.
For example, assume that The Spark log UI logs report that the two stages are running in parallel. But actually, They don't look like they're running in parallel, it feels like they're just changing the Stage they're running, like the Executors are context switching.
Sorry for not attached the pictures.
Thanks.
My question here is, is there any way to make the Executors run in parallel across Stages, for example, if I have 8 Executors, is there way to put 4 Executors on Stage 2 and 4 Executors on Stage 3 in parallel?
In general, Stages run sequentially. One Stage must complete before the other starts. That is the Spark paradigm.
https://queirozf.com/entries/apache-spark-architecture-overview-clusters-jobs-stages-tasks Can be consulted. Noting oc comment.
Unless a Spark App has more than 1 completely unrelated set of transformation logic paths, thereby allowing parallel Stage execution. In all honesty I never have done that, I had N Apps.