20
20
from google .protobuf import duration_pb2 # type: ignore
21
21
from google .protobuf import field_mask_pb2 # type: ignore
22
22
from google .protobuf import timestamp_pb2 # type: ignore
23
+ from google .type import interval_pb2 # type: ignore
23
24
import proto # type: ignore
24
25
25
26
from google .cloud .dataproc_v1 .types import shared
@@ -837,26 +838,20 @@ class InstanceGroupConfig(proto.Message):
837
838
Instance Group. See `Dataproc -> Minimum CPU
838
839
Platform <https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu>`__.
839
840
min_num_instances (int):
840
- Optional. The minimum number of instances to create. If
841
- min_num_instances is set, min_num_instances is used for a
842
- criteria to decide the cluster. Cluster creation will be
843
- failed by being an error state if the total number of
844
- instances created is less than the min_num_instances. For
845
- example, given that num_instances = 5 and min_num_instances
846
- = 3,
847
-
848
- - if 4 instances are created and then registered
849
- successfully but one instance is failed, the failed VM
850
- will be deleted and the cluster will be resized to 4
851
- instances in running state.
852
- - if 2 instances are created successfully and 3 instances
853
- are failed, the cluster will be in an error state and
854
- does not delete failed VMs for debugging.
855
- - if 2 instance are created and then registered
856
- successfully but 3 instances are failed to initialize,
857
- the cluster will be in an error state and does not delete
858
- failed VMs for debugging. NB: This can only be set for
859
- primary workers now.
841
+ Optional. The minimum number of primary worker instances to
842
+ create. If ``min_num_instances`` is set, cluster creation
843
+ will succeed if the number of primary workers created is at
844
+ least equal to the ``min_num_instances`` number.
845
+
846
+ Example: Cluster creation request with ``num_instances`` =
847
+ ``5`` and ``min_num_instances`` = ``3``:
848
+
849
+ - If 4 VMs are created and 1 instance fails, the failed VM
850
+ is deleted. The cluster is resized to 4 instances and
851
+ placed in a ``RUNNING`` state.
852
+ - If 2 instances are created and 3 instances fail, the
853
+ cluster in placed in an ``ERROR`` state. The failed VMs
854
+ are not deleted.
860
855
instance_flexibility_policy (google.cloud.dataproc_v1.types.InstanceFlexibilityPolicy):
861
856
Optional. Instance flexibility Policy
862
857
allowing a mixture of VM shapes and provisioning
@@ -1251,13 +1246,13 @@ class NodeGroup(proto.Message):
1251
1246
"""
1252
1247
1253
1248
class Role (proto .Enum ):
1254
- r"""Node group roles.
1249
+ r"""Node pool roles.
1255
1250
1256
1251
Values:
1257
1252
ROLE_UNSPECIFIED (0):
1258
1253
Required unspecified role.
1259
1254
DRIVER (1):
1260
- Job drivers run on the node group .
1255
+ Job drivers run on the node pool .
1261
1256
"""
1262
1257
ROLE_UNSPECIFIED = 0
1263
1258
DRIVER = 1
@@ -2359,6 +2354,22 @@ class DiagnoseClusterRequest(proto.Message):
2359
2354
handle the request.
2360
2355
cluster_name (str):
2361
2356
Required. The cluster name.
2357
+ tarball_gcs_dir (str):
2358
+ Optional. The output Cloud Storage directory
2359
+ for the diagnostic tarball. If not specified, a
2360
+ task-specific directory in the cluster's staging
2361
+ bucket will be used.
2362
+ diagnosis_interval (google.type.interval_pb2.Interval):
2363
+ Optional. Time interval in which diagnosis
2364
+ should be carried out on the cluster.
2365
+ jobs (MutableSequence[str]):
2366
+ Optional. Specifies a list of jobs on which
2367
+ diagnosis is to be performed. Format:
2368
+ projects/{project}/regions/{region}/jobs/{job}
2369
+ yarn_application_ids (MutableSequence[str]):
2370
+ Optional. Specifies a list of yarn
2371
+ applications on which diagnosis is to be
2372
+ performed.
2362
2373
"""
2363
2374
2364
2375
project_id : str = proto .Field (
@@ -2373,6 +2384,23 @@ class DiagnoseClusterRequest(proto.Message):
2373
2384
proto .STRING ,
2374
2385
number = 2 ,
2375
2386
)
2387
+ tarball_gcs_dir : str = proto .Field (
2388
+ proto .STRING ,
2389
+ number = 4 ,
2390
+ )
2391
+ diagnosis_interval : interval_pb2 .Interval = proto .Field (
2392
+ proto .MESSAGE ,
2393
+ number = 6 ,
2394
+ message = interval_pb2 .Interval ,
2395
+ )
2396
+ jobs : MutableSequence [str ] = proto .RepeatedField (
2397
+ proto .STRING ,
2398
+ number = 10 ,
2399
+ )
2400
+ yarn_application_ids : MutableSequence [str ] = proto .RepeatedField (
2401
+ proto .STRING ,
2402
+ number = 11 ,
2403
+ )
2376
2404
2377
2405
2378
2406
class DiagnoseClusterResults (proto .Message ):
0 commit comments