VictorPlusC commented on a change in pull request #16741:
URL: https://github.com/apache/beam/pull/16741#discussion_r808592828



##########
File path: 
sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py
##########
@@ -84,46 +89,71 @@ def create_cluster(self, cluster: dict) -> None:
     try:
       self._cluster_client.create_cluster(
           request={
-              'project_id': self._project_id,
-              'region': self._region,
+              'project_id': self.cluster_metadata.project_id,
+              'region': self.cluster_metadata.region,
               'cluster': cluster
           })
-      _LOGGER.info('Cluster created successfully: %s', self._cluster_name)
+      _LOGGER.info(
+          'Cluster created successfully: %s',
+          self.cluster_metadata.cluster_name)
+      self.master_url = self.get_master_url(self.cluster_metadata)
     except Exception as e:
       if e.code == 409:
-        if self._cluster_name == self.DEFAULT_NAME:
+        if self.cluster_metadata in ie.current_env(
+        ).clusters.master_urls.inverse:

Review comment:
       This is a much better flow, thanks for that. I've incorporated the logic 
now.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to