■ はじめに
https://dk521123.hatenablog.com/entry/2022/01/15/014005
の続き。 今回は、Airflow の タスクインスタンスの状態について、徐々にメモっていく
目次
【1】状態遷移図 【2】Task Instance状態
【1】状態遷移図
* まずは、以下の公式ドキュメントの状態遷移図を見ておくのが 理解が早いのではないかと思う => その後に後述「【2】Task Instance状態」で補うのがよさげ
https://airflow.apache.org/docs/apache-airflow/stable/_images/task_lifecycle_diagram.png
【2】Task Instance状態
https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/tasks.html
https://cloud.google.com/blog/ja/products/data-analytics/airflow-dag-and-task-concurrency-in-cloud-composer
状態 | 説明 | 英語説明 |
---|---|---|
none | 初期状態 | The Task has not yet been queued for execution (its dependencies are not yet met) |
scheduled | スケジューラが実行可能と判断した状態(以下、状態遷移図参照) | The scheduler has determined the Task’s dependencies are met and it should run (タスクの依存関係が満たされており、実行する必要があるとスケジューラが判断) |
queued | タスクがキューに積まれて実行待ち状態 | The Task has not yet been queued for execution (its dependencies are not yet met) |
running | タスク実行中 | The task is running on a worker (or on a local/synchronous executor) |
success | タスク成功 | The task finished running without errors |
restarting | タスク再起動中 | The task was externally requested to restart when it was running |
failed | タスク失敗 | The task had an error during execution and failed to run |
skipped | タスクがスキップされた | The task was skipped due to branching, LatestOnly, or similar. |
upstream_failed | 親タスク失敗 | An upstream task failed and the Trigger Rule says we needed it (上流のタスクが失敗し、トリガールールはそのタスクが必要である) |
up_for_retry | リトライ中 | The task failed, but has retry attempts left and will be rescheduled (タスクは失敗しましたが、再試行回数が残っているので、再スケジュール) |
up_for_reschedule | 再スケジュール中 | The task is a Sensor that is in reschedule mode |
deferred | タスク延期された状態 | The task has been deferred to a trigger |
removed | タスク削除(終了) | The task has vanished from the DAG since the run started |
参考文献
関連記事
Apache Airflow ~ 基礎知識編 ~
https://dk521123.hatenablog.com/entry/2021/09/28/135510
Apache Airflow ~ 環境構築編 ~
https://dk521123.hatenablog.com/entry/2021/07/18/004531
Apache Airflow ~ 環境構築 / Docker 編 ~
https://dk521123.hatenablog.com/entry/2021/10/11/134840
Apache Airflow ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2021/07/24/233012
Apache Airflow ~ 基本編 ~
https://dk521123.hatenablog.com/entry/2021/07/28/234319
Apache Airflow ~ 実行タイミング ~
https://dk521123.hatenablog.com/entry/2022/01/15/014005
Apache Airflow ~ CLI ~
https://dk521123.hatenablog.com/entry/2021/10/21/130702
Apache Airflow ~ Backfill ~
https://dk521123.hatenablog.com/entry/2024/10/05/234219
Apache Airflow ~ あれこれ編 ~
https://dk521123.hatenablog.com/entry/2021/09/30/163020