Colin-Cheng commented on code in PR #74753:
URL: https://github.com/apache/airflow/pull/74753#discussion_r4287014922


##########
providers/google/tests/system/google/cloud/dataproc/example_dataproc_cluster_high_obtainability.py:
##########
@@ -0,0 +1,178 @@
+#
+# 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.
+"""Example Airflow DAG for a Dataproc High Obtainability (HO) mode cluster.
+
+In High Obtainability mode node groups are described by abstract requirements
+(``FlexibleInstanceGroupConfig``: number of instances, core count and hardware
+class) instead of concrete machine types. Dataproc resolves them into a ranked
+list of widely available machine families to minimize stockouts. HO clusters
+are always auto-zoned.
+
+The DAG creates an HO cluster, scales its primary workers through the
+authoritative ``config.worker_flexible_config.num_instances`` update path,
+scales the secondary workers through the legacy
+``config.secondary_worker_config.num_instances`` compatibility path (which the
+API keeps accepting for HO clusters), submits a Spark job and deletes the
+cluster.
+"""
+
+from __future__ import annotations
+
+import os
+from datetime import datetime
+
+from airflow.models.dag import DAG
+from airflow.providers.google.cloud.operators.dataproc import (
+    ClusterGenerator,

Review Comment:
    `ClusterGenerator ` is deprecated. Please pass `cluster_config` or 
`virtual_cluster_config` dictionaries directly as arguments to the 
`DataprocCreateClusterOperator`. 
https://github.com/apache/airflow/blob/62641fa9ac01cf2443936790fdd1265ebfd57b86/providers/google/docs/operators/cloud/dataproc.rst#generating-cluster-config



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