exploy commented on a change in pull request #4015: [AIRFLOW-2789] Create
single node DataProc cluster
URL: https://github.com/apache/incubator-airflow/pull/4015#discussion_r224750058
##########
File path: airflow/contrib/operators/dataproc_operator.py
##########
@@ -205,10 +208,19 @@ def __init__(self,
self.idle_delete_ttl = idle_delete_ttl
self.auto_delete_time = auto_delete_time
self.auto_delete_ttl = auto_delete_ttl
+ self.single_node = single_node
assert not (self.custom_image and self.image_version), \
"custom_image and image_version can't be both set"
+ assert (
+ self.single_node and
+ self.num_preemptible_workers + self.num_workers == 0
+ ) or (
+ not self.single_node and
+ self.num_preemptible_workers + self.num_workers != 0
+ )
Review comment:
Changed behavior and added message when assertion fails
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services