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 2018/10/12 04:32:21 UTC

[GitHub] Fokko commented on a change in pull request #4015: [AIRFLOW-2789] Create single node DataProc cluster

Fokko 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_r224668060
 
 

 ##########
 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:
   Maybe add a helpful message for the end user here?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services