1- // Copyright 2022 Google LLC
1+ // Copyright 2023 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -489,10 +489,10 @@ message GceClusterConfig {
489489 // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
490490 repeated string tags = 4 ;
491491
492- // The Compute Engine metadata entries to add to all instances (see
492+ // Optional. The Compute Engine metadata entries to add to all instances (see
493493 // [Project and instance
494494 // metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
495- map <string , string > metadata = 5 ;
495+ map <string , string > metadata = 5 [ (google.api .field_behavior ) = OPTIONAL ] ;
496496
497497 // Optional. Reservation Affinity for consuming Zonal reservation.
498498 ReservationAffinity reservation_affinity = 11
@@ -600,6 +600,10 @@ message InstanceGroupConfig {
600600 repeated string instance_names = 2
601601 [(google.api.field_behavior ) = OUTPUT_ONLY ];
602602
603+ // Output only. List of references to Compute Engine instances.
604+ repeated InstanceReference instance_references = 11
605+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
606+
603607 // Optional. The Compute Engine image resource used for cluster instances.
604608 //
605609 // The URI can represent an image or image family.
@@ -666,6 +670,44 @@ message InstanceGroupConfig {
666670 // See [Dataproc -> Minimum CPU
667671 // Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
668672 string min_cpu_platform = 9 [(google.api.field_behavior ) = OPTIONAL ];
673+
674+ // Optional. The minimum number of instances to create.
675+ // If min_num_instances is set, min_num_instances is used for a criteria to
676+ // decide the cluster. Cluster creation will be failed by being an error state
677+ // if the total number of instances created is less than the
678+ // min_num_instances.
679+ // For example, given that num_instances = 5 and min_num_instances = 3,
680+ // * if 4 instances are created and then registered successfully but one
681+ // instance is failed, the failed VM will be deleted and the cluster will be
682+ // resized to 4 instances in running state.
683+ // * if 2 instances are created successfully and 3 instances are failed,
684+ // the cluster will be in an error state and does not delete failed VMs for
685+ // debugging.
686+ // * if 2 instance are created and then registered successfully but 3
687+ // instances are failed to initialize, the cluster will be in an error state
688+ // and does not delete failed VMs for debugging.
689+ // NB: This can only be set for primary workers now.
690+ int32 min_num_instances = 12 [(google.api.field_behavior ) = OPTIONAL ];
691+
692+ // Optional. Instance flexibility Policy allowing a mixture of VM shapes and
693+ // provisioning models.
694+ InstanceFlexibilityPolicy instance_flexibility_policy = 13
695+ [(google.api.field_behavior ) = OPTIONAL ];
696+ }
697+
698+ // A reference to a Compute Engine instance.
699+ message InstanceReference {
700+ // The user-friendly name of the Compute Engine instance.
701+ string instance_name = 1 ;
702+
703+ // The unique identifier of the Compute Engine instance.
704+ string instance_id = 2 ;
705+
706+ // The public RSA key used for sharing data with this instance.
707+ string public_key = 3 ;
708+
709+ // The public ECIES key used for sharing data with this instance.
710+ string public_ecies_key = 4 ;
669711}
670712
671713// Specifies the resources used to actively manage an instance group.
@@ -677,6 +719,48 @@ message ManagedGroupConfig {
677719 // Output only. The name of the Instance Group Manager for this group.
678720 string instance_group_manager_name = 2
679721 [(google.api.field_behavior ) = OUTPUT_ONLY ];
722+
723+ // Output only. The partial URI to the instance group manager for this group.
724+ // E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm.
725+ string instance_group_manager_uri = 3
726+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
727+ }
728+
729+ // Instance flexibility Policy allowing a mixture of VM shapes and provisioning
730+ // models.
731+ message InstanceFlexibilityPolicy {
732+ // Defines machines types and a rank to which the machines types belong.
733+ message InstanceSelection {
734+ // Optional. Full machine-type names, e.g. "n1-standard-16".
735+ repeated string machine_types = 1 [(google.api.field_behavior ) = OPTIONAL ];
736+
737+ // Optional. Preference of this instance selection. Lower number means
738+ // higher preference. Dataproc will first try to create a VM based on the
739+ // machine-type with priority rank and fallback to next rank based on
740+ // availability. Machine types and instance selections with the same
741+ // priority have the same preference.
742+ int32 rank = 2 [(google.api.field_behavior ) = OPTIONAL ];
743+ }
744+
745+ // Defines a mapping from machine types to the number of VMs that are created
746+ // with each machine type.
747+ message InstanceSelectionResult {
748+ // Output only. Full machine-type names, e.g. "n1-standard-16".
749+ optional string machine_type = 1
750+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
751+
752+ // Output only. Number of VM provisioned with the machine_type.
753+ optional int32 vm_count = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
754+ }
755+
756+ // Optional. List of instance selection options that the group will use when
757+ // creating new VMs.
758+ repeated InstanceSelection instance_selection_list = 2
759+ [(google.api.field_behavior ) = OPTIONAL ];
760+
761+ // Output only. A list of instance selection results in the group.
762+ repeated InstanceSelectionResult instance_selection_results = 3
763+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
680764}
681765
682766// Specifies the type and number of accelerator cards attached to the instances
@@ -844,6 +928,9 @@ message ClusterStatus {
844928
845929 // The cluster is being started. It is not ready for use.
846930 STARTING = 8 ;
931+
932+ // The cluster is being repaired. It is not ready for use.
933+ REPAIRING = 10 ;
847934 }
848935
849936 // The cluster substate.
@@ -1075,16 +1162,16 @@ message ClusterMetrics {
10751162
10761163// Dataproc metric config.
10771164message DataprocMetricConfig {
1078- // A source for the collection of Dataproc OSS metrics (see [available OSS
1165+ // A source for the collection of Dataproc custom metrics (see [Custom
10791166 // metrics]
1080- // (https://cloud.google.com//dataproc/docs/guides/monitoring#available_oss_metrics )).
1167+ // (https://cloud.google.com//dataproc/docs/guides/dataproc-metrics#custom_metrics )).
10811168 enum MetricSource {
10821169 // Required unspecified metric source.
10831170 METRIC_SOURCE_UNSPECIFIED = 0 ;
10841171
1085- // Default monitoring agent metrics. If this source is enabled,
1172+ // Monitoring agent metrics. If this source is enabled,
10861173 // Dataproc enables the monitoring agent in Compute Engine,
1087- // and collects default monitoring agent metrics, which are published
1174+ // and collects monitoring agent metrics, which are published
10881175 // with an `agent.googleapis.com` prefix.
10891176 MONITORING_AGENT_DEFAULTS = 1 ;
10901177
@@ -1107,17 +1194,17 @@ message DataprocMetricConfig {
11071194 HIVEMETASTORE = 7 ;
11081195 }
11091196
1110- // A Dataproc OSS metric.
1197+ // A Dataproc custom metric.
11111198 message Metric {
1112- // Required. Default metrics are collected unless `metricOverrides` are
1113- // specified for the metric source (see [Available OSS metrics]
1114- // (https://cloud.google.com/dataproc/docs/guides/monitoring#available_oss_metrics )
1199+ // Required. A standard set of metrics is collected unless `metricOverrides`
1200+ // are specified for the metric source (see [Custom metrics]
1201+ // (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics )
11151202 // for more information).
11161203 MetricSource metric_source = 1 [(google.api.field_behavior ) = REQUIRED ];
11171204
1118- // Optional. Specify one or more [available OSS metrics]
1119- // (https://cloud.google.com/dataproc/docs/guides/monitoring#available_oss_metrics )
1120- // to collect for the metric course (for the `SPARK` metric source, any
1205+ // Optional. Specify one or more [Custom metrics]
1206+ // (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics )
1207+ // to collect for the metric course (for the `SPARK` metric source ( any
11211208 // [Spark metric]
11221209 // (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be
11231210 // specified).
@@ -1137,13 +1224,13 @@ message DataprocMetricConfig {
11371224 //
11381225 // Notes:
11391226 //
1140- // * Only the specified overridden metrics will be collected for the
1227+ // * Only the specified overridden metrics are collected for the
11411228 // metric source. For example, if one or more `spark:executive` metrics
1142- // are listed as metric overrides, other `SPARK` metrics will not be
1143- // collected. The collection of the default metrics for other OSS metric
1144- // sources is unaffected. For example, if both `SPARK` andd `YARN` metric
1145- // sources are enabled, and overrides are provided for Spark metrics only,
1146- // all default YARN metrics will be collected.
1229+ // are listed as metric overrides, other `SPARK` metrics are not
1230+ // collected. The collection of the metrics for other enabled custom
1231+ // metric sources is unaffected. For example, if both `SPARK` andd `YARN`
1232+ // metric sources are enabled, and overrides are provided for Spark
1233+ // metrics only, all YARN metrics are collected.
11471234 repeated string metric_overrides = 2
11481235 [(google.api.field_behavior ) = OPTIONAL ];
11491236 }
0 commit comments