[
https://issues.apache.org/jira/browse/BEAM-13799?focusedWorklogId=721248&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-721248
]
ASF GitHub Bot logged work on BEAM-13799:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Feb/22 23:36
Start Date: 04/Feb/22 23:36
Worklog Time Spent: 10m
Work Description: KevinGG commented on a change in pull request #16691:
URL: https://github.com/apache/beam/pull/16691#discussion_r799879492
##########
File path:
sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py
##########
@@ -0,0 +1,163 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# pytype: skip-file
+
+import logging
+
+try:
+ from google.cloud import dataproc_v1
+except ImportError:
+ raise ImportError(
+ 'Google Cloud Dataproc not supported for this execution environment.')
+
+_LOGGER = logging.getLogger(__name__)
+
+
+class DataprocClusterManager:
+ """The DataprocClusterManager object simplifies the operations
+ required for creating and deleting Dataproc clusters for use
+ under Interactive Beam.
+ """
+ DEFAULT_NAME = 'interactive-beam-cluster'
+
+ def __init__(
+ self,
+ project_id: str = '',
Review comment:
You can do `Optional[str]` and provide a default value `None`.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 721248)
Time Spent: 5h (was: 4h 50m)
> Create an Interactive Beam Dataproc package for users to manage clusters with
> -----------------------------------------------------------------------------
>
> Key: BEAM-13799
> URL: https://issues.apache.org/jira/browse/BEAM-13799
> Project: Beam
> Issue Type: New Feature
> Components: runner-py-interactive
> Reporter: Victor Chen
> Assignee: Victor Chen
> Priority: P2
> Time Spent: 5h
> Remaining Estimate: 0h
>
> * Adds a package to support the creation of Dataproc clusters that have been
> configured with a Flink session
> * By default, a created Dataproc cluster will be called
> 'interactive-beam-cluster'
> * Users additionally will have the ability to:
> ** specify a name of their choosing for the created cluster, a warning is
> raised to notify the user that they will have to delete the cluster on their
> own
> ** delete the cluster with the default name, 'interactive-beam-cluster'
--
This message was sent by Atlassian Jira
(v8.20.1#820001)