You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding Support for Yarn queue and other extras in SparkSubmit Operator and Hook #35911
The --queue option is particularly useful in a multi-tenant environment where different users or groups have allocated resources in specific YARN queues.
@eladkal,
I am thinking of adding it as an argument in SparkSubmitOperator if user wants to override it from connection extras.
let me know what you think.
We normally allow to override connection extra from the operator level. For example with Snowflake you can set different warehouse than the default one set in the connection.
changed the title [-]Adding Support for Yarn queue in SparkSubmit Operator[/-][+]Adding Support for Yarn queue and other extras in SparkSubmit Operator and Hook[/+]on Dec 12, 2023
:param queue: which queue to target when running this job. Not
all executors implement queue management, the CeleryExecutor
does support targeting specific queues.
So if you are using CeleryKubernetesExecutor, you cannot decide the Operator run on KubernetesExecutor by setting the queue to kubernetes_queue
Since 4.6.0 where this was introduced, onwards, using SparkSubmitOperator is broken for us, as the queue can no longer be taken into account due to this change.
Before, this queue parameter overrode BaseOperator value where a queue is an Airflow queue
Activity
pateash commentedon Nov 28, 2023
Please assign this to me, this is a quick fix
I will try to complete this ASAP.
hussein-awala commentedon Nov 28, 2023
@pateash assigned you.
pateash commentedon Dec 2, 2023
Currently it's possible to set this option inside Spark connection, but we should have the ability to override it if needed using operator arguments.

eladkal commentedon Dec 2, 2023
So do we have a task to complete here?
pateash commentedon Dec 3, 2023
@eladkal,
I am thinking of adding it as an argument in SparkSubmitOperator if user wants to override it from connection extras.
let me know what you think.
eladkal commentedon Dec 3, 2023
We normally allow to override connection extra from the operator level. For example with Snowflake you can set different warehouse than the default one set in the connection.
pateash commentedon Dec 7, 2023
Yes, it's done using args AFAIK,
Let me add an argument to override this.
[-]Adding Support for Yarn queue in SparkSubmit Operator[/-][+]Adding Support for Yarn queue and other extras in SparkSubmit Operator and Hook[/+]databius commentedon Mar 18, 2024
I think the update caused the new issue since SparkSubmitOperator accidentally override the Base Operator's parameter.
https://github.com/apache/airflow/blob/main/airflow/providers/apache/spark/operators/spark_submit.py#L76
https://github.com/apache/airflow/blob/main/airflow/models/baseoperator.py#L587
So if you are using CeleryKubernetesExecutor, you cannot decide the Operator run on KubernetesExecutor by setting the
queueto kubernetes_queuedjuarezg commentedon Mar 25, 2024
Since 4.6.0 where this was introduced, onwards, using SparkSubmitOperator is broken for us, as the queue can no longer be taken into account due to this change.
Before, this
queueparameter overrode BaseOperator value where a queue is an Airflow queue