airflow.providers.amazon.aws.utils.waiter¶
属性¶
类¶
用于控制 EMRClusterJobFlowOperator 中的等待行为。 |
函数¶
|
调用 get_state_callable 直到达到 desired_state 或 failure_states。 |
|
模块内容¶
- airflow.providers.amazon.aws.utils.waiter.waiter(get_state_callable, get_state_args, parse_response, desired_state, failure_states, object_type, action, countdown=25 * 60, check_interval_seconds=60)[源码]¶
调用 get_state_callable 直到达到 desired_state 或 failure_states。
- 请注意:虽然尚未弃用,但我们正在逐步淘汰此方法
并鼓励使用自定义 boto waiter,具体请参阅 https://github.com/apache/airflow/tree/main/airflow/providers/amazon/aws/waiters
- 参数:
get_state_callable (Callable) – 一个可调用对象,将一直运行直到返回 True
get_state_args (dict) – 传递给 get_state_callable 的参数
parse_response (list) – 从 get_state_callable 的响应中提取状态的字典键
desired_state (set) – 等待直到获取器返回此值
failure_states (set) – 一组表示失败的状态,如果在达到 desired_state 之前达到其中任何一个,则应抛出异常
object_type (str) – 用于报告字符串。你在等待什么?(应用程序、任务等)
action (str) – 用于报告字符串。你在等待什么操作?(创建、删除等)
countdown (int | float | None) – waiter 应等待所需状态的秒数,超时前。默认为 25 * 60 秒。None = 无限。
check_interval_seconds (int) – waiter 在尝试重新调用 get_state_callable 之前应等待的秒数。默认为 60 秒。
- class airflow.providers.amazon.aws.utils.waiter.WaitPolicy[源码]¶
-
用于控制 EMRClusterJobFlowOperator 中的等待行为。
选项: - WAIT_FOR_COMPLETION - 将等待集群报告“Running”状态 - WAIT_FOR_STEPS_COMPLETION - 将等待集群报告“Terminated”状态
-
airflow.providers.amazon.aws.utils.waiter.WAITER_POLICY_NAME_MAPPING:
dict
[WaitPolicy
,str
][源码]¶