astronomer.providers.apache.livy.triggers.livy

This module contains the Apache Livy Trigger.

Module Contents

Classes

LivyTrigger

This class is deprecated and will be removed in 2.0.0.

class astronomer.providers.apache.livy.triggers.livy.LivyTrigger(batch_id, spark_params, livy_conn_id='livy_default', polling_interval=0, extra_options=None, extra_headers=None, livy_hook_async=None)[source]

Bases: airflow.triggers.base.BaseTrigger

This class is deprecated and will be removed in 2.0.0. Use :class: ~airflow.providers.apache.livy.triggers.livy.LivyTrigger instead.

serialize()[source]

Serializes LivyTrigger arguments and classpath.

async run()[source]

Checks if the _polling_interval > 0, in that case it pools Livy for batch termination asynchrnonously. else returns the success response

async poll_for_termination(batch_id)[source]

Pool Livy for batch termination asynchrnonously.

Parameters:

batch_id (Union[int, str]) – id of the batch session to monitor.