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 2022/04/13 13:49:10 UTC

[GitHub] [airflow] eladkal commented on a diff in pull request #22980: Add auto termination to emr job flow

eladkal commented on code in PR #22980:
URL: https://github.com/apache/airflow/pull/22980#discussion_r849505717


##########
airflow/providers/amazon/aws/operators/emr.py:
##########
@@ -404,3 +404,80 @@ def execute(self, context: 'Context') -> None:
             raise AirflowException(f'JobFlow termination failed: {response}')
         else:
             self.log.info('JobFlow with id %s terminated', self.job_flow_id)
+
+
+class EmrAutoTerminatePolicyOperator(BaseOperator):
+    """
+    An operator to put auto terminate policy on a given cluster/jobflow
+    Note: auto terminate policy is supported with Amazon EMR versions 5.30.0 and 6.1.0 and later.

Review Comment:
   Should / Can we generalize it to be `EmrChangePolicyOperator` thus allowing to change setting rather than focusing on a specific one?
   
   For example this operator is using `put_auto_termination_policy` what if someone else wants `put_auto_scaling_policy` will we create a new dedicated operator?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org