Skip to content

Commit

Permalink
feat: add optional parameters (tarball_gcs_dir, diagnosis_interval, j…
Browse files Browse the repository at this point in the history
…obs, yarn_application_ids) in DiagnoseClusterRequest

PiperOrigin-RevId: 565501215
  • Loading branch information
Google APIs authored and Copybara-Service committed Sep 14, 2023
1 parent ae05e3b commit 6b95655
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 19 deletions.
4 changes: 3 additions & 1 deletion google/cloud/dataproc/v1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ proto_library(
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/type:interval_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
],
)

Expand Down Expand Up @@ -144,6 +146,7 @@ go_proto_library(
deps = [
"//google/api:annotations_go_proto",
"//google/longrunning:longrunning_go_proto",
"//google/type:interval_go_proto",
],
)

Expand Down Expand Up @@ -354,7 +357,6 @@ load(

csharp_proto_library(
name = "dataproc_csharp_proto",
extra_opts = [],
deps = [":dataproc_proto"],
)

Expand Down
55 changes: 37 additions & 18 deletions google/cloud/dataproc/v1/clusters.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import "google/longrunning/operations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/type/interval.proto";

option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb";
option java_multiple_files = true;
Expand Down Expand Up @@ -671,22 +673,20 @@ message InstanceGroupConfig {
// Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
string min_cpu_platform = 9 [(google.api.field_behavior) = OPTIONAL];

// Optional. The minimum number of instances to create.
// If min_num_instances is set, min_num_instances is used for a criteria to
// decide the cluster. Cluster creation will be failed by being an error state
// if the total number of instances created is less than the
// min_num_instances.
// For example, given that num_instances = 5 and min_num_instances = 3,
// * if 4 instances are created and then registered successfully but one
// instance is failed, the failed VM will be deleted and the cluster will be
// resized to 4 instances in running state.
// * if 2 instances are created successfully and 3 instances are failed,
// the cluster will be in an error state and does not delete failed VMs for
// debugging.
// * if 2 instance are created and then registered successfully but 3
// instances are failed to initialize, the cluster will be in an error state
// and does not delete failed VMs for debugging.
// NB: This can only be set for primary workers now.
// Optional. The minimum number of primary worker instances to create.
// If `min_num_instances` is set, cluster creation will succeed if
// the number of primary workers created is at least equal to the
// `min_num_instances` number.
//
// Example: Cluster creation request with `num_instances` = `5` and
// `min_num_instances` = `3`:
//
// * If 4 VMs are created and 1 instance fails,
// the failed VM is deleted. The cluster is
// resized to 4 instances and placed in a `RUNNING` state.
// * If 2 instances are created and 3 instances fail,
// the cluster in placed in an `ERROR` state. The failed VMs
// are not deleted.
int32 min_num_instances = 12 [(google.api.field_behavior) = OPTIONAL];

// Optional. Instance flexibility Policy allowing a mixture of VM shapes and
Expand Down Expand Up @@ -843,12 +843,12 @@ message NodeGroup {
pattern: "projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}"
};

// Node group roles.
// Node pool roles.
enum Role {
// Required unspecified role.
ROLE_UNSPECIFIED = 0;

// Job drivers run on the node group.
// Job drivers run on the node pool.
DRIVER = 1;
}

Expand Down Expand Up @@ -1531,6 +1531,25 @@ message DiagnoseClusterRequest {

// Required. The cluster name.
string cluster_name = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. The output Cloud Storage directory for the diagnostic
// tarball. If not specified, a task-specific directory in the cluster's
// staging bucket will be used.
string tarball_gcs_dir = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. Time interval in which diagnosis should be carried out on the
// cluster.
google.type.Interval diagnosis_interval = 6
[(google.api.field_behavior) = OPTIONAL];

// Optional. Specifies a list of jobs on which diagnosis is to be performed.
// Format: projects/{project}/regions/{region}/jobs/{job}
repeated string jobs = 10 [(google.api.field_behavior) = OPTIONAL];

// Optional. Specifies a list of yarn applications on which diagnosis is to be
// performed.
repeated string yarn_application_ids = 11
[(google.api.field_behavior) = OPTIONAL];
}

// The location of diagnostic output.
Expand Down

0 comments on commit 6b95655

Please sign in to comment.