在docs (https://airflow.incubator.apache.org/tutorial.html#recap)中给出的气流演示教程(刚刚开始使用气流进行试验测试)之后,我注意到在运行回填airflow backfill tutorial -s 2015-06-01 -e 2015-06-07时,对于某些任务存在“未满足的依赖关系”的初始抱怨。
[me@mapr001 dags]$ airflow backfill tutorial -s 2015-06-01 -e 2015-06-07
[2018-07-20 14:34:29,868] {__init__.py:45} INFO - Using executor SequentialExecutor
[2018-07-20 14:34:29,917] {models.py:189} INFO - Filling up the DagBag from /home/me/airflow/dags
[2018-07-20 14:34:30,659] {models.py:1197} INFO - Dependencies all met for <TaskInstance: tutorial.print_date 2015-06-06 00:00:00 [scheduled]>
[2018-07-20 14:34:30,664] {base_executor.py:49} INFO - Adding to queue: airflow run tutorial print_date 2015-06-06T00:00:00 --local -sd DAGS_FOLDER/tutorial.py
......
[2018-07-20 14:34:30,806] {models.py:1190} INFO - Dependencies not met for <TaskInstance: tutorial.templated 2015-06-01 00:00:00 [scheduled]>, dependency 'Trigger Rule' FAILED: Task's trigger rule 'all_success' requires all upstream tasks to have succeeded, but found 1 non-success(es). upstream_tasks_state={'skipped': 0, 'successes': 0, 'failed': 0, 'upstream_failed': 0, 'done': 0, 'total': 1}, upstream_task_ids=['print_date']
[2018-07-20 14:34:30,815] {models.py:1190} INFO - Dependencies not met for <TaskInstance: tutorial.templated 2015-06-03 00:00:00 [scheduled]>, dependency 'Trigger Rule' FAILED: Task's trigger rule 'all_success' requires all upstream tasks to have succeeded, but found 1 non-success(es). upstream_tasks_state={'skipped': 0, 'successes': 0, 'failed': 0, 'upstream_failed': 0, 'done': 0, 'total': 1}, upstream_task_ids=['print_date']
......这似乎表明了一些不好的东西(https://airflow.incubator.apache.org/concepts.html#trigger-rules),然而回填似乎在终端和web中成功结束。
所以我的问题是:这是怎么回事?这是正常的行为吗?“模板”任务检查它是否可以运行,看到'print_date‘任务没有完成,所以只是等待)?这是在医生的某个地方直接解释的吗?
发布于 2018-07-21 02:41:47
这是正常的行为。我发现最好的解释是在models.py的源代码中。
返回在依赖项的上下文中是否满足了运行此任务实例的所有条件(例如,从UI运行的任务实例将忽略某些依赖项)。
也许这对你也有帮助,因为:关于调度的airflow.readthedocs
气流调度程序监视所有任务和所有DAG,并触发满足依赖关系的任务实例。在幕后,它监视可能包含的所有DAG对象的文件夹并保持其同步,并定期(每分钟左右)检查活动任务,以确定它们是否可以被触发。。
https://stackoverflow.com/questions/51452002
复制相似问题