You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/31 14:42:55 UTC
[GitHub] [airflow] aviemzur commented on a change in pull request #6898:
[AIRFLOW-6432] fix EmrAddStepsOperator broken ref & faulty test & add test
case for missing cluster
aviemzur commented on a change in pull request #6898: [AIRFLOW-6432] fix EmrAddStepsOperator broken ref & faulty test & add test case for missing cluster
URL: https://github.com/apache/airflow/pull/6898#discussion_r362226904
##########
File path: airflow/contrib/operators/emr_add_steps_operator.py
##########
@@ -68,12 +68,16 @@ def __init__(
self.steps = steps
def execute(self, context):
- emr = EmrHook(aws_conn_id=self.aws_conn_id).get_conn()
+ emr_hook = EmrHook(aws_conn_id=self.aws_conn_id)
+
+ emr = emr_hook.get_conn()
job_flow_id = self.job_flow_id
if not job_flow_id:
- job_flow_id = emr.get_cluster_id_by_name(self.job_flow_name, self.cluster_states)
+ job_flow_id = emr_hook.get_cluster_id_by_name(self.job_flow_name, self.cluster_states)
+ if not job_flow_id:
Review comment:
Sure
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services