我们正在升级到气流2.0,我有以下任务:
with dag:
cms_ingest = SubDagOperator(
subdag=cms_s3ingest(
DAG_NAME, 'cms_s3ingest', default_args['start_date'], dag.schedule_interval),
task_id='cms_s3ingest',
# so that subtasks can run in parallel
executor=LocalExecutor(),
task_concurrency=4)
但我看到了这个错误:
airflow.exceptions.Airflow异常:无效的参数被传递给SubDagoperator(task_id:cms_s3ingest)。无效的参数是:**kwargs:{'执行者': LocalExecator(并行性=32)}
在我的气流中。cfg file I的值为:parallelism=32
我相信这就是LocalExecator正在使用的https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/executors/local_executor/index.html#airflow.executors.local_executor.LocalExecutor.
为什么这个错误会在气流2.0.2中出现,我应该如何修复它?
当行为从回填更改为调度器逻辑(PR)时,执行器
参数从SubDagoperator
中删除。
但即使在此之前,也不建议在SubDagOperator
中并行任务,这就是为什么它默认为SequentialExecutor
(您可以在此处了解原因)
因为您使用的是气流