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
I used LivyOperator (deferrable = True) to create spark job by livy, and execution_timeout is 2h.
What happened
When the spark job run for more than 2h, airflow will detect it's timeout and cancel the trigger.
And then wake up the task to execute on_kill function.
Then livy operator failed with AttributeError: 'LivyOperator' object has no attribute '_batch_id'
when it execute on_kill function.
What you think should happen instead
The Livy operator should fail due to a timeout, and simultaneously, it should kill the Spark job.
How to reproduce
Utilize the LivyOperator in your workflow.
Configure the operator with deferrable=True and execution_timeout=600 (for a 10-minute timeout).
Execute a Spark job that is expected to run for longer than 10 minutes.
Anything else
Seems like when the livy operator is rewaked up after trigger is time out, the _batch_id here is not initialized, which cause it failed to run on_kill function.
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Apache Airflow Provider(s)
apache-livy
Versions of Apache Airflow Providers
3.5.4
Apache Airflow version
2.7.2
Operating System
Amazon MWAA
Deployment
Amazon (AWS) MWAA
Deployment details
I used LivyOperator (deferrable = True) to create spark job by livy, and execution_timeout is 2h.
What happened
When the spark job run for more than 2h, airflow will detect it's timeout and cancel the trigger.
And then wake up the task to execute on_kill function.
Then livy operator failed with
AttributeError: 'LivyOperator' object has no attribute '_batch_id'
when it execute on_kill function.
What you think should happen instead
The Livy operator should fail due to a timeout, and simultaneously, it should kill the Spark job.
How to reproduce
Utilize the LivyOperator in your workflow.
Configure the operator with deferrable=True and execution_timeout=600 (for a 10-minute timeout).
Execute a Spark job that is expected to run for longer than 10 minutes.
Anything else
Seems like when the livy operator is rewaked up after trigger is time out, the _batch_id here is not initialized, which cause it failed to run on_kill function.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: