Created
April 2, 2020 19:30
-
-
Save Mageswaran1989/db0ce211d22f5f9c1186100c945b749b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCHEDULE_INTERVAL = "0 * * * *" | |
cluster_ids = None | |
fernet = get_fernet() | |
default_args = { | |
"depends_on_past": False, | |
"start_date": airflow.utils.dates.days_ago(1), | |
"retries": 1, | |
"retry_delay": datetime.timedelta(hours=1), | |
} | |
dag = DAG("EMRMonitoring", | |
default_args=default_args, | |
catchup=False, | |
schedule_interval=SCHEDULE_INTERVAL) | |
start = DummyOperator( | |
task_id='start', | |
dag=dag | |
) | |
end = DummyOperator( | |
task_id='end', | |
dag=dag) | |
emr_monitor_dag = EMRMonitorOperator(job_flow_id=None, | |
job_flow_name=None, | |
task_id='emr_monitor', | |
dag=dag) | |
start.set_downstream(emr_monitor_dag) | |
emr_monitor_dag.set_downstream(end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://medium.com/swlh/aws-emr-monitoring-and-alerting-bot-20db4b9662