google-cloud-dataproc 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/dataproc.rb +56 -3
- data/lib/google/cloud/dataproc/v1.rb +62 -3
- data/lib/google/cloud/dataproc/v1/cluster_controller_client.rb +65 -5
- data/lib/google/cloud/dataproc/v1/cluster_controller_client_config.json +10 -7
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +11 -0
- data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -2
- data/lib/google/cloud/dataproc/v1/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/clusters.rb +128 -45
- data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/jobs.rb +32 -15
- data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/workflow_templates.rb +519 -0
- data/lib/google/cloud/dataproc/v1/doc/google/longrunning/operations.rb +1 -43
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/any.rb +1 -1
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/dataproc/v1/doc/google/rpc/status.rb +1 -1
- data/lib/google/cloud/dataproc/v1/job_controller_client.rb +16 -2
- data/lib/google/cloud/dataproc/v1/job_controller_client_config.json +9 -6
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -0
- data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +2 -1
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +0 -2
- data/lib/google/cloud/dataproc/v1/workflow_template_service_client.rb +690 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service_client_config.json +64 -0
- data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +181 -0
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +102 -0
- data/lib/google/cloud/dataproc/v1beta2.rb +281 -0
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client.rb +799 -0
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client_config.json +59 -0
- data/lib/google/cloud/dataproc/v1beta2/clusters_pb.rb +189 -0
- data/lib/google/cloud/dataproc/v1beta2/clusters_services_pb.rb +60 -0
- data/lib/google/cloud/dataproc/v1beta2/credentials.rb +41 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/clusters.rb +666 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/jobs.rb +691 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/workflow_templates.rb +524 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/longrunning/operations.rb +51 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/any.rb +130 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/duration.rb +91 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/empty.rb +29 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/field_mask.rb +230 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/timestamp.rb +109 -0
- data/lib/google/cloud/dataproc/v1beta2/doc/google/rpc/status.rb +84 -0
- data/lib/google/cloud/dataproc/v1beta2/job_controller_client.rb +581 -0
- data/lib/google/cloud/dataproc/v1beta2/job_controller_client_config.json +59 -0
- data/lib/google/cloud/dataproc/v1beta2/jobs_pb.rb +248 -0
- data/lib/google/cloud/dataproc/v1beta2/jobs_services_pb.rb +61 -0
- data/lib/google/cloud/dataproc/v1beta2/operations_pb.rb +44 -0
- data/lib/google/cloud/dataproc/v1beta2/shared_pb.rb +18 -0
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client.rb +698 -0
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client_config.json +64 -0
- data/lib/google/cloud/dataproc/v1beta2/workflow_templates_pb.rb +183 -0
- data/lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb +102 -0
- metadata +36 -5
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"interfaces": {
|
|
3
|
+
"google.cloud.dataproc.v1beta2.ClusterController": {
|
|
4
|
+
"retry_codes": {
|
|
5
|
+
"idempotent": [
|
|
6
|
+
"DEADLINE_EXCEEDED",
|
|
7
|
+
"INTERNAL",
|
|
8
|
+
"UNAVAILABLE"
|
|
9
|
+
],
|
|
10
|
+
"non_idempotent": [
|
|
11
|
+
"UNAVAILABLE"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"retry_params": {
|
|
15
|
+
"default": {
|
|
16
|
+
"initial_retry_delay_millis": 100,
|
|
17
|
+
"retry_delay_multiplier": 1.3,
|
|
18
|
+
"max_retry_delay_millis": 60000,
|
|
19
|
+
"initial_rpc_timeout_millis": 10000,
|
|
20
|
+
"rpc_timeout_multiplier": 1.0,
|
|
21
|
+
"max_rpc_timeout_millis": 10000,
|
|
22
|
+
"total_timeout_millis": 300000
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"methods": {
|
|
26
|
+
"CreateCluster": {
|
|
27
|
+
"timeout_millis": 30000,
|
|
28
|
+
"retry_codes_name": "non_idempotent",
|
|
29
|
+
"retry_params_name": "default"
|
|
30
|
+
},
|
|
31
|
+
"UpdateCluster": {
|
|
32
|
+
"timeout_millis": 30000,
|
|
33
|
+
"retry_codes_name": "non_idempotent",
|
|
34
|
+
"retry_params_name": "default"
|
|
35
|
+
},
|
|
36
|
+
"DeleteCluster": {
|
|
37
|
+
"timeout_millis": 30000,
|
|
38
|
+
"retry_codes_name": "non_idempotent",
|
|
39
|
+
"retry_params_name": "default"
|
|
40
|
+
},
|
|
41
|
+
"GetCluster": {
|
|
42
|
+
"timeout_millis": 60000,
|
|
43
|
+
"retry_codes_name": "idempotent",
|
|
44
|
+
"retry_params_name": "default"
|
|
45
|
+
},
|
|
46
|
+
"ListClusters": {
|
|
47
|
+
"timeout_millis": 60000,
|
|
48
|
+
"retry_codes_name": "idempotent",
|
|
49
|
+
"retry_params_name": "default"
|
|
50
|
+
},
|
|
51
|
+
"DiagnoseCluster": {
|
|
52
|
+
"timeout_millis": 60000,
|
|
53
|
+
"retry_codes_name": "non_idempotent",
|
|
54
|
+
"retry_params_name": "default"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# source: google/cloud/dataproc/v1beta2/clusters.proto
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/annotations_pb'
|
|
8
|
+
require 'google/cloud/dataproc/v1beta2/shared_pb'
|
|
9
|
+
require 'google/cloud/dataproc/v1beta2/operations_pb'
|
|
10
|
+
require 'google/longrunning/operations_pb'
|
|
11
|
+
require 'google/protobuf/duration_pb'
|
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
|
13
|
+
require 'google/protobuf/timestamp_pb'
|
|
14
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
|
+
add_message "google.cloud.dataproc.v1beta2.Cluster" do
|
|
16
|
+
optional :project_id, :string, 1
|
|
17
|
+
optional :cluster_name, :string, 2
|
|
18
|
+
optional :config, :message, 3, "google.cloud.dataproc.v1beta2.ClusterConfig"
|
|
19
|
+
map :labels, :string, :string, 8
|
|
20
|
+
optional :status, :message, 4, "google.cloud.dataproc.v1beta2.ClusterStatus"
|
|
21
|
+
repeated :status_history, :message, 7, "google.cloud.dataproc.v1beta2.ClusterStatus"
|
|
22
|
+
optional :cluster_uuid, :string, 6
|
|
23
|
+
optional :metrics, :message, 9, "google.cloud.dataproc.v1beta2.ClusterMetrics"
|
|
24
|
+
end
|
|
25
|
+
add_message "google.cloud.dataproc.v1beta2.ClusterConfig" do
|
|
26
|
+
optional :config_bucket, :string, 1
|
|
27
|
+
optional :gce_cluster_config, :message, 8, "google.cloud.dataproc.v1beta2.GceClusterConfig"
|
|
28
|
+
optional :master_config, :message, 9, "google.cloud.dataproc.v1beta2.InstanceGroupConfig"
|
|
29
|
+
optional :worker_config, :message, 10, "google.cloud.dataproc.v1beta2.InstanceGroupConfig"
|
|
30
|
+
optional :secondary_worker_config, :message, 12, "google.cloud.dataproc.v1beta2.InstanceGroupConfig"
|
|
31
|
+
optional :software_config, :message, 13, "google.cloud.dataproc.v1beta2.SoftwareConfig"
|
|
32
|
+
optional :lifecycle_config, :message, 14, "google.cloud.dataproc.v1beta2.LifecycleConfig"
|
|
33
|
+
repeated :initialization_actions, :message, 11, "google.cloud.dataproc.v1beta2.NodeInitializationAction"
|
|
34
|
+
optional :encryption_config, :message, 15, "google.cloud.dataproc.v1beta2.EncryptionConfig"
|
|
35
|
+
end
|
|
36
|
+
add_message "google.cloud.dataproc.v1beta2.EncryptionConfig" do
|
|
37
|
+
optional :gce_pd_kms_key_name, :string, 1
|
|
38
|
+
end
|
|
39
|
+
add_message "google.cloud.dataproc.v1beta2.GceClusterConfig" do
|
|
40
|
+
optional :zone_uri, :string, 1
|
|
41
|
+
optional :network_uri, :string, 2
|
|
42
|
+
optional :subnetwork_uri, :string, 6
|
|
43
|
+
optional :internal_ip_only, :bool, 7
|
|
44
|
+
optional :service_account, :string, 8
|
|
45
|
+
repeated :service_account_scopes, :string, 3
|
|
46
|
+
repeated :tags, :string, 4
|
|
47
|
+
map :metadata, :string, :string, 5
|
|
48
|
+
end
|
|
49
|
+
add_message "google.cloud.dataproc.v1beta2.InstanceGroupConfig" do
|
|
50
|
+
optional :num_instances, :int32, 1
|
|
51
|
+
repeated :instance_names, :string, 2
|
|
52
|
+
optional :image_uri, :string, 3
|
|
53
|
+
optional :machine_type_uri, :string, 4
|
|
54
|
+
optional :disk_config, :message, 5, "google.cloud.dataproc.v1beta2.DiskConfig"
|
|
55
|
+
optional :is_preemptible, :bool, 6
|
|
56
|
+
optional :managed_group_config, :message, 7, "google.cloud.dataproc.v1beta2.ManagedGroupConfig"
|
|
57
|
+
repeated :accelerators, :message, 8, "google.cloud.dataproc.v1beta2.AcceleratorConfig"
|
|
58
|
+
optional :min_cpu_platform, :string, 9
|
|
59
|
+
end
|
|
60
|
+
add_message "google.cloud.dataproc.v1beta2.ManagedGroupConfig" do
|
|
61
|
+
optional :instance_template_name, :string, 1
|
|
62
|
+
optional :instance_group_manager_name, :string, 2
|
|
63
|
+
end
|
|
64
|
+
add_message "google.cloud.dataproc.v1beta2.AcceleratorConfig" do
|
|
65
|
+
optional :accelerator_type_uri, :string, 1
|
|
66
|
+
optional :accelerator_count, :int32, 2
|
|
67
|
+
end
|
|
68
|
+
add_message "google.cloud.dataproc.v1beta2.DiskConfig" do
|
|
69
|
+
optional :boot_disk_type, :string, 3
|
|
70
|
+
optional :boot_disk_size_gb, :int32, 1
|
|
71
|
+
optional :num_local_ssds, :int32, 2
|
|
72
|
+
end
|
|
73
|
+
add_message "google.cloud.dataproc.v1beta2.LifecycleConfig" do
|
|
74
|
+
optional :idle_delete_ttl, :message, 1, "google.protobuf.Duration"
|
|
75
|
+
oneof :ttl do
|
|
76
|
+
optional :auto_delete_time, :message, 2, "google.protobuf.Timestamp"
|
|
77
|
+
optional :auto_delete_ttl, :message, 3, "google.protobuf.Duration"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
add_message "google.cloud.dataproc.v1beta2.NodeInitializationAction" do
|
|
81
|
+
optional :executable_file, :string, 1
|
|
82
|
+
optional :execution_timeout, :message, 2, "google.protobuf.Duration"
|
|
83
|
+
end
|
|
84
|
+
add_message "google.cloud.dataproc.v1beta2.ClusterStatus" do
|
|
85
|
+
optional :state, :enum, 1, "google.cloud.dataproc.v1beta2.ClusterStatus.State"
|
|
86
|
+
optional :detail, :string, 2
|
|
87
|
+
optional :state_start_time, :message, 3, "google.protobuf.Timestamp"
|
|
88
|
+
optional :substate, :enum, 4, "google.cloud.dataproc.v1beta2.ClusterStatus.Substate"
|
|
89
|
+
end
|
|
90
|
+
add_enum "google.cloud.dataproc.v1beta2.ClusterStatus.State" do
|
|
91
|
+
value :UNKNOWN, 0
|
|
92
|
+
value :CREATING, 1
|
|
93
|
+
value :RUNNING, 2
|
|
94
|
+
value :ERROR, 3
|
|
95
|
+
value :DELETING, 4
|
|
96
|
+
value :UPDATING, 5
|
|
97
|
+
end
|
|
98
|
+
add_enum "google.cloud.dataproc.v1beta2.ClusterStatus.Substate" do
|
|
99
|
+
value :UNSPECIFIED, 0
|
|
100
|
+
value :UNHEALTHY, 1
|
|
101
|
+
value :STALE_STATUS, 2
|
|
102
|
+
end
|
|
103
|
+
add_message "google.cloud.dataproc.v1beta2.SoftwareConfig" do
|
|
104
|
+
optional :image_version, :string, 1
|
|
105
|
+
map :properties, :string, :string, 2
|
|
106
|
+
end
|
|
107
|
+
add_message "google.cloud.dataproc.v1beta2.ClusterMetrics" do
|
|
108
|
+
map :hdfs_metrics, :string, :int64, 1
|
|
109
|
+
map :yarn_metrics, :string, :int64, 2
|
|
110
|
+
end
|
|
111
|
+
add_message "google.cloud.dataproc.v1beta2.CreateClusterRequest" do
|
|
112
|
+
optional :project_id, :string, 1
|
|
113
|
+
optional :region, :string, 3
|
|
114
|
+
optional :cluster, :message, 2, "google.cloud.dataproc.v1beta2.Cluster"
|
|
115
|
+
optional :request_id, :string, 4
|
|
116
|
+
end
|
|
117
|
+
add_message "google.cloud.dataproc.v1beta2.UpdateClusterRequest" do
|
|
118
|
+
optional :project_id, :string, 1
|
|
119
|
+
optional :region, :string, 5
|
|
120
|
+
optional :cluster_name, :string, 2
|
|
121
|
+
optional :cluster, :message, 3, "google.cloud.dataproc.v1beta2.Cluster"
|
|
122
|
+
optional :graceful_decommission_timeout, :message, 6, "google.protobuf.Duration"
|
|
123
|
+
optional :update_mask, :message, 4, "google.protobuf.FieldMask"
|
|
124
|
+
optional :request_id, :string, 7
|
|
125
|
+
end
|
|
126
|
+
add_message "google.cloud.dataproc.v1beta2.DeleteClusterRequest" do
|
|
127
|
+
optional :project_id, :string, 1
|
|
128
|
+
optional :region, :string, 3
|
|
129
|
+
optional :cluster_name, :string, 2
|
|
130
|
+
optional :cluster_uuid, :string, 4
|
|
131
|
+
optional :request_id, :string, 5
|
|
132
|
+
end
|
|
133
|
+
add_message "google.cloud.dataproc.v1beta2.GetClusterRequest" do
|
|
134
|
+
optional :project_id, :string, 1
|
|
135
|
+
optional :region, :string, 3
|
|
136
|
+
optional :cluster_name, :string, 2
|
|
137
|
+
end
|
|
138
|
+
add_message "google.cloud.dataproc.v1beta2.ListClustersRequest" do
|
|
139
|
+
optional :project_id, :string, 1
|
|
140
|
+
optional :region, :string, 4
|
|
141
|
+
optional :filter, :string, 5
|
|
142
|
+
optional :page_size, :int32, 2
|
|
143
|
+
optional :page_token, :string, 3
|
|
144
|
+
end
|
|
145
|
+
add_message "google.cloud.dataproc.v1beta2.ListClustersResponse" do
|
|
146
|
+
repeated :clusters, :message, 1, "google.cloud.dataproc.v1beta2.Cluster"
|
|
147
|
+
optional :next_page_token, :string, 2
|
|
148
|
+
end
|
|
149
|
+
add_message "google.cloud.dataproc.v1beta2.DiagnoseClusterRequest" do
|
|
150
|
+
optional :project_id, :string, 1
|
|
151
|
+
optional :region, :string, 3
|
|
152
|
+
optional :cluster_name, :string, 2
|
|
153
|
+
end
|
|
154
|
+
add_message "google.cloud.dataproc.v1beta2.DiagnoseClusterResults" do
|
|
155
|
+
optional :output_uri, :string, 1
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
module Google
|
|
160
|
+
module Cloud
|
|
161
|
+
module Dataproc
|
|
162
|
+
module V1beta2
|
|
163
|
+
Cluster = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.Cluster").msgclass
|
|
164
|
+
ClusterConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ClusterConfig").msgclass
|
|
165
|
+
EncryptionConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.EncryptionConfig").msgclass
|
|
166
|
+
GceClusterConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.GceClusterConfig").msgclass
|
|
167
|
+
InstanceGroupConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.InstanceGroupConfig").msgclass
|
|
168
|
+
ManagedGroupConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ManagedGroupConfig").msgclass
|
|
169
|
+
AcceleratorConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.AcceleratorConfig").msgclass
|
|
170
|
+
DiskConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.DiskConfig").msgclass
|
|
171
|
+
LifecycleConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.LifecycleConfig").msgclass
|
|
172
|
+
NodeInitializationAction = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.NodeInitializationAction").msgclass
|
|
173
|
+
ClusterStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ClusterStatus").msgclass
|
|
174
|
+
ClusterStatus::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ClusterStatus.State").enummodule
|
|
175
|
+
ClusterStatus::Substate = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ClusterStatus.Substate").enummodule
|
|
176
|
+
SoftwareConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.SoftwareConfig").msgclass
|
|
177
|
+
ClusterMetrics = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ClusterMetrics").msgclass
|
|
178
|
+
CreateClusterRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.CreateClusterRequest").msgclass
|
|
179
|
+
UpdateClusterRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.UpdateClusterRequest").msgclass
|
|
180
|
+
DeleteClusterRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.DeleteClusterRequest").msgclass
|
|
181
|
+
GetClusterRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.GetClusterRequest").msgclass
|
|
182
|
+
ListClustersRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ListClustersRequest").msgclass
|
|
183
|
+
ListClustersResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.ListClustersResponse").msgclass
|
|
184
|
+
DiagnoseClusterRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.DiagnoseClusterRequest").msgclass
|
|
185
|
+
DiagnoseClusterResults = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.DiagnoseClusterResults").msgclass
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: google/cloud/dataproc/v1beta2/clusters.proto for package 'google.cloud.dataproc.v1beta2'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Copyright 2018 Google LLC.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
# you may not use this file except in compliance with the License.
|
|
8
|
+
# You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
#
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
require 'grpc'
|
|
22
|
+
require 'google/cloud/dataproc/v1beta2/clusters_pb'
|
|
23
|
+
|
|
24
|
+
module Google
|
|
25
|
+
module Cloud
|
|
26
|
+
module Dataproc
|
|
27
|
+
module V1beta2
|
|
28
|
+
module ClusterController
|
|
29
|
+
# The ClusterControllerService provides methods to manage clusters
|
|
30
|
+
# of Compute Engine instances.
|
|
31
|
+
class Service
|
|
32
|
+
|
|
33
|
+
include GRPC::GenericService
|
|
34
|
+
|
|
35
|
+
self.marshal_class_method = :encode
|
|
36
|
+
self.unmarshal_class_method = :decode
|
|
37
|
+
self.service_name = 'google.cloud.dataproc.v1beta2.ClusterController'
|
|
38
|
+
|
|
39
|
+
# Creates a cluster in a project.
|
|
40
|
+
rpc :CreateCluster, CreateClusterRequest, Google::Longrunning::Operation
|
|
41
|
+
# Updates a cluster in a project.
|
|
42
|
+
rpc :UpdateCluster, UpdateClusterRequest, Google::Longrunning::Operation
|
|
43
|
+
# Deletes a cluster in a project.
|
|
44
|
+
rpc :DeleteCluster, DeleteClusterRequest, Google::Longrunning::Operation
|
|
45
|
+
# Gets the resource representation for a cluster in a project.
|
|
46
|
+
rpc :GetCluster, GetClusterRequest, Cluster
|
|
47
|
+
# Lists all regions/\\{region}/clusters in a project.
|
|
48
|
+
rpc :ListClusters, ListClustersRequest, ListClustersResponse
|
|
49
|
+
# Gets cluster diagnostic information.
|
|
50
|
+
# After the operation completes, the Operation.response field
|
|
51
|
+
# contains `DiagnoseClusterOutputLocation`.
|
|
52
|
+
rpc :DiagnoseCluster, DiagnoseClusterRequest, Google::Longrunning::Operation
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
Stub = Service.rpc_stub_class
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright 2019 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
require "googleauth"
|
|
17
|
+
|
|
18
|
+
module Google
|
|
19
|
+
module Cloud
|
|
20
|
+
module Dataproc
|
|
21
|
+
module V1beta2
|
|
22
|
+
class Credentials < Google::Auth::Credentials
|
|
23
|
+
SCOPE = [
|
|
24
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
|
25
|
+
].freeze
|
|
26
|
+
PATH_ENV_VARS = %w(DATAPROC_CREDENTIALS
|
|
27
|
+
DATAPROC_KEYFILE
|
|
28
|
+
GOOGLE_CLOUD_CREDENTIALS
|
|
29
|
+
GOOGLE_CLOUD_KEYFILE
|
|
30
|
+
GCLOUD_KEYFILE)
|
|
31
|
+
JSON_ENV_VARS = %w(DATAPROC_CREDENTIALS_JSON
|
|
32
|
+
DATAPROC_KEYFILE_JSON
|
|
33
|
+
GOOGLE_CLOUD_CREDENTIALS_JSON
|
|
34
|
+
GOOGLE_CLOUD_KEYFILE_JSON
|
|
35
|
+
GCLOUD_KEYFILE_JSON)
|
|
36
|
+
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
# Copyright 2019 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
module Google
|
|
17
|
+
module Cloud
|
|
18
|
+
module Dataproc
|
|
19
|
+
module V1beta2
|
|
20
|
+
# Describes the identifying information, config, and status of
|
|
21
|
+
# a cluster of Compute Engine instances.
|
|
22
|
+
# @!attribute [rw] project_id
|
|
23
|
+
# @return [String]
|
|
24
|
+
# Required. The Google Cloud Platform project ID that the cluster belongs to.
|
|
25
|
+
# @!attribute [rw] cluster_name
|
|
26
|
+
# @return [String]
|
|
27
|
+
# Required. The cluster name. Cluster names within a project must be
|
|
28
|
+
# unique. Names of deleted clusters can be reused.
|
|
29
|
+
# @!attribute [rw] config
|
|
30
|
+
# @return [Google::Cloud::Dataproc::V1beta2::ClusterConfig]
|
|
31
|
+
# Required. The cluster config. Note that Cloud Dataproc may set
|
|
32
|
+
# default values, and values may change when clusters are updated.
|
|
33
|
+
# @!attribute [rw] labels
|
|
34
|
+
# @return [Hash{String => String}]
|
|
35
|
+
# Optional. The labels to associate with this cluster.
|
|
36
|
+
# Label **keys** must contain 1 to 63 characters, and must conform to
|
|
37
|
+
# [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
|
|
38
|
+
# Label **values** may be empty, but, if present, must contain 1 to 63
|
|
39
|
+
# characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
|
|
40
|
+
# No more than 32 labels can be associated with a cluster.
|
|
41
|
+
# @!attribute [rw] status
|
|
42
|
+
# @return [Google::Cloud::Dataproc::V1beta2::ClusterStatus]
|
|
43
|
+
# Output only. Cluster status.
|
|
44
|
+
# @!attribute [rw] status_history
|
|
45
|
+
# @return [Array<Google::Cloud::Dataproc::V1beta2::ClusterStatus>]
|
|
46
|
+
# Output only. The previous cluster status.
|
|
47
|
+
# @!attribute [rw] cluster_uuid
|
|
48
|
+
# @return [String]
|
|
49
|
+
# Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc
|
|
50
|
+
# generates this value when it creates the cluster.
|
|
51
|
+
# @!attribute [rw] metrics
|
|
52
|
+
# @return [Google::Cloud::Dataproc::V1beta2::ClusterMetrics]
|
|
53
|
+
# Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
|
|
54
|
+
#
|
|
55
|
+
# **Beta Feature**: This report is available for testing purposes only. It may
|
|
56
|
+
# be changed before final release.
|
|
57
|
+
class Cluster; end
|
|
58
|
+
|
|
59
|
+
# The cluster config.
|
|
60
|
+
# @!attribute [rw] config_bucket
|
|
61
|
+
# @return [String]
|
|
62
|
+
# Optional. A Cloud Storage staging bucket used for sharing generated
|
|
63
|
+
# SSH keys and config. If you do not specify a staging bucket, Cloud
|
|
64
|
+
# Dataproc will determine an appropriate Cloud Storage location (US,
|
|
65
|
+
# ASIA, or EU) for your cluster's staging bucket according to the Google
|
|
66
|
+
# Compute Engine zone where your cluster is deployed, and then it will create
|
|
67
|
+
# and manage this project-level, per-location bucket for you.
|
|
68
|
+
# @!attribute [rw] gce_cluster_config
|
|
69
|
+
# @return [Google::Cloud::Dataproc::V1beta2::GceClusterConfig]
|
|
70
|
+
# Required. The shared Compute Engine config settings for
|
|
71
|
+
# all instances in a cluster.
|
|
72
|
+
# @!attribute [rw] master_config
|
|
73
|
+
# @return [Google::Cloud::Dataproc::V1beta2::InstanceGroupConfig]
|
|
74
|
+
# Optional. The Compute Engine config settings for
|
|
75
|
+
# the master instance in a cluster.
|
|
76
|
+
# @!attribute [rw] worker_config
|
|
77
|
+
# @return [Google::Cloud::Dataproc::V1beta2::InstanceGroupConfig]
|
|
78
|
+
# Optional. The Compute Engine config settings for
|
|
79
|
+
# worker instances in a cluster.
|
|
80
|
+
# @!attribute [rw] secondary_worker_config
|
|
81
|
+
# @return [Google::Cloud::Dataproc::V1beta2::InstanceGroupConfig]
|
|
82
|
+
# Optional. The Compute Engine config settings for
|
|
83
|
+
# additional worker instances in a cluster.
|
|
84
|
+
# @!attribute [rw] software_config
|
|
85
|
+
# @return [Google::Cloud::Dataproc::V1beta2::SoftwareConfig]
|
|
86
|
+
# Optional. The config settings for software inside the cluster.
|
|
87
|
+
# @!attribute [rw] lifecycle_config
|
|
88
|
+
# @return [Google::Cloud::Dataproc::V1beta2::LifecycleConfig]
|
|
89
|
+
# Optional. The config setting for auto delete cluster schedule.
|
|
90
|
+
# @!attribute [rw] initialization_actions
|
|
91
|
+
# @return [Array<Google::Cloud::Dataproc::V1beta2::NodeInitializationAction>]
|
|
92
|
+
# Optional. Commands to execute on each node after config is
|
|
93
|
+
# completed. By default, executables are run on master and all worker nodes.
|
|
94
|
+
# You can test a node's <code>role</code> metadata to run an executable on
|
|
95
|
+
# a master or worker node, as shown below using `curl` (you can also use `wget`):
|
|
96
|
+
#
|
|
97
|
+
# ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)
|
|
98
|
+
# if [[ "${ROLE}" == 'Master' ]]; then
|
|
99
|
+
# ... master specific actions ...
|
|
100
|
+
# else
|
|
101
|
+
# ... worker specific actions ...
|
|
102
|
+
# fi
|
|
103
|
+
# @!attribute [rw] encryption_config
|
|
104
|
+
# @return [Google::Cloud::Dataproc::V1beta2::EncryptionConfig]
|
|
105
|
+
# Optional. Encryption settings for the cluster.
|
|
106
|
+
class ClusterConfig; end
|
|
107
|
+
|
|
108
|
+
# Encryption settings for the cluster.
|
|
109
|
+
# @!attribute [rw] gce_pd_kms_key_name
|
|
110
|
+
# @return [String]
|
|
111
|
+
# Optional. The Cloud KMS key name to use for PD disk encryption for all
|
|
112
|
+
# instances in the cluster.
|
|
113
|
+
class EncryptionConfig; end
|
|
114
|
+
|
|
115
|
+
# Common config settings for resources of Compute Engine cluster
|
|
116
|
+
# instances, applicable to all instances in the cluster.
|
|
117
|
+
# @!attribute [rw] zone_uri
|
|
118
|
+
# @return [String]
|
|
119
|
+
# Optional. The zone where the Compute Engine cluster will be located.
|
|
120
|
+
# On a create request, it is required in the "global" region. If omitted
|
|
121
|
+
# in a non-global Cloud Dataproc region, the service will pick a zone in the
|
|
122
|
+
# corresponding Compute Engine region. On a get request, zone will always be
|
|
123
|
+
# present.
|
|
124
|
+
#
|
|
125
|
+
# A full URL, partial URI, or short name are valid. Examples:
|
|
126
|
+
#
|
|
127
|
+
# * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
|
|
128
|
+
# * `projects/[project_id]/zones/[zone]`
|
|
129
|
+
# * `us-central1-f`
|
|
130
|
+
# @!attribute [rw] network_uri
|
|
131
|
+
# @return [String]
|
|
132
|
+
# Optional. The Compute Engine network to be used for machine
|
|
133
|
+
# communications. Cannot be specified with subnetwork_uri. If neither
|
|
134
|
+
# `network_uri` nor `subnetwork_uri` is specified, the "default" network of
|
|
135
|
+
# the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
|
|
136
|
+
# [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for more information).
|
|
137
|
+
#
|
|
138
|
+
# A full URL, partial URI, or short name are valid. Examples:
|
|
139
|
+
#
|
|
140
|
+
# * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
|
|
141
|
+
# * `projects/[project_id]/regions/global/default`
|
|
142
|
+
# * `default`
|
|
143
|
+
# @!attribute [rw] subnetwork_uri
|
|
144
|
+
# @return [String]
|
|
145
|
+
# Optional. The Compute Engine subnetwork to be used for machine
|
|
146
|
+
# communications. Cannot be specified with network_uri.
|
|
147
|
+
#
|
|
148
|
+
# A full URL, partial URI, or short name are valid. Examples:
|
|
149
|
+
#
|
|
150
|
+
# * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`
|
|
151
|
+
# * `projects/[project_id]/regions/us-east1/sub0`
|
|
152
|
+
# * `sub0`
|
|
153
|
+
# @!attribute [rw] internal_ip_only
|
|
154
|
+
# @return [true, false]
|
|
155
|
+
# Optional. If true, all instances in the cluster will only have internal IP
|
|
156
|
+
# addresses. By default, clusters are not restricted to internal IP addresses,
|
|
157
|
+
# and will have ephemeral external IP addresses assigned to each instance.
|
|
158
|
+
# This `internal_ip_only` restriction can only be enabled for subnetwork
|
|
159
|
+
# enabled networks, and all off-cluster dependencies must be configured to be
|
|
160
|
+
# accessible without external IP addresses.
|
|
161
|
+
# @!attribute [rw] service_account
|
|
162
|
+
# @return [String]
|
|
163
|
+
# Optional. The service account of the instances. Defaults to the default
|
|
164
|
+
# Compute Engine service account. Custom service accounts need
|
|
165
|
+
# permissions equivalent to the following IAM roles:
|
|
166
|
+
#
|
|
167
|
+
# * roles/logging.logWriter
|
|
168
|
+
# * roles/storage.objectAdmin
|
|
169
|
+
#
|
|
170
|
+
# (see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts
|
|
171
|
+
# for more information).
|
|
172
|
+
# Example: `[account_id]@[project_id].iam.gserviceaccount.com`
|
|
173
|
+
# @!attribute [rw] service_account_scopes
|
|
174
|
+
# @return [Array<String>]
|
|
175
|
+
# Optional. The URIs of service account scopes to be included in
|
|
176
|
+
# Compute Engine instances. The following base set of scopes is always
|
|
177
|
+
# included:
|
|
178
|
+
#
|
|
179
|
+
# * https://www.googleapis.com/auth/cloud.useraccounts.readonly
|
|
180
|
+
# * https://www.googleapis.com/auth/devstorage.read_write
|
|
181
|
+
# * https://www.googleapis.com/auth/logging.write
|
|
182
|
+
#
|
|
183
|
+
# If no scopes are specified, the following defaults are also provided:
|
|
184
|
+
#
|
|
185
|
+
# * https://www.googleapis.com/auth/bigquery
|
|
186
|
+
# * https://www.googleapis.com/auth/bigtable.admin.table
|
|
187
|
+
# * https://www.googleapis.com/auth/bigtable.data
|
|
188
|
+
# * https://www.googleapis.com/auth/devstorage.full_control
|
|
189
|
+
# @!attribute [rw] tags
|
|
190
|
+
# @return [Array<String>]
|
|
191
|
+
# The Compute Engine tags to add to all instances (see
|
|
192
|
+
# [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
|
|
193
|
+
# @!attribute [rw] metadata
|
|
194
|
+
# @return [Hash{String => String}]
|
|
195
|
+
# The Compute Engine metadata entries to add to all instances (see
|
|
196
|
+
# [Project and instance metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
|
|
197
|
+
class GceClusterConfig; end
|
|
198
|
+
|
|
199
|
+
# Optional. The config settings for Compute Engine resources in
|
|
200
|
+
# an instance group, such as a master or worker group.
|
|
201
|
+
# @!attribute [rw] num_instances
|
|
202
|
+
# @return [Integer]
|
|
203
|
+
# Optional. The number of VM instances in the instance group.
|
|
204
|
+
# For master instance groups, must be set to 1.
|
|
205
|
+
# @!attribute [rw] instance_names
|
|
206
|
+
# @return [Array<String>]
|
|
207
|
+
# Output only. The list of instance names. Cloud Dataproc derives the names
|
|
208
|
+
# from `cluster_name`, `num_instances`, and the instance group.
|
|
209
|
+
# @!attribute [rw] image_uri
|
|
210
|
+
# @return [String]
|
|
211
|
+
# Optional. The Compute Engine image resource used for cluster
|
|
212
|
+
# instances. It can be specified or may be inferred from
|
|
213
|
+
# `SoftwareConfig.image_version`.
|
|
214
|
+
# @!attribute [rw] machine_type_uri
|
|
215
|
+
# @return [String]
|
|
216
|
+
# Optional. The Compute Engine machine type used for cluster instances.
|
|
217
|
+
#
|
|
218
|
+
# A full URL, partial URI, or short name are valid. Examples:
|
|
219
|
+
#
|
|
220
|
+
# * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
|
|
221
|
+
# * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
|
|
222
|
+
# * `n1-standard-2`
|
|
223
|
+
#
|
|
224
|
+
# **Auto Zone Exception**: If you are using the Cloud Dataproc
|
|
225
|
+
# [Auto Zone Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
|
|
226
|
+
# feature, you must use the short name of the machine type
|
|
227
|
+
# resource, for example, `n1-standard-2`.
|
|
228
|
+
# @!attribute [rw] disk_config
|
|
229
|
+
# @return [Google::Cloud::Dataproc::V1beta2::DiskConfig]
|
|
230
|
+
# Optional. Disk option config settings.
|
|
231
|
+
# @!attribute [rw] is_preemptible
|
|
232
|
+
# @return [true, false]
|
|
233
|
+
# Optional. Specifies that this instance group contains preemptible instances.
|
|
234
|
+
# @!attribute [rw] managed_group_config
|
|
235
|
+
# @return [Google::Cloud::Dataproc::V1beta2::ManagedGroupConfig]
|
|
236
|
+
# Output only. The config for Compute Engine Instance Group
|
|
237
|
+
# Manager that manages this group.
|
|
238
|
+
# This is only used for preemptible instance groups.
|
|
239
|
+
# @!attribute [rw] accelerators
|
|
240
|
+
# @return [Array<Google::Cloud::Dataproc::V1beta2::AcceleratorConfig>]
|
|
241
|
+
# Optional. The Compute Engine accelerator configuration for these
|
|
242
|
+
# instances.
|
|
243
|
+
#
|
|
244
|
+
# **Beta Feature**: This feature is still under development. It may be
|
|
245
|
+
# changed before final release.
|
|
246
|
+
# @!attribute [rw] min_cpu_platform
|
|
247
|
+
# @return [String]
|
|
248
|
+
# Optional. Specifies the minimum cpu platform for the Instance Group.
|
|
249
|
+
# See [Cloud Dataproc→Minimum CPU Platform]
|
|
250
|
+
# (/dataproc/docs/concepts/compute/dataproc-min-cpu).
|
|
251
|
+
class InstanceGroupConfig; end
|
|
252
|
+
|
|
253
|
+
# Specifies the resources used to actively manage an instance group.
|
|
254
|
+
# @!attribute [rw] instance_template_name
|
|
255
|
+
# @return [String]
|
|
256
|
+
# Output only. The name of the Instance Template used for the Managed
|
|
257
|
+
# Instance Group.
|
|
258
|
+
# @!attribute [rw] instance_group_manager_name
|
|
259
|
+
# @return [String]
|
|
260
|
+
# Output only. The name of the Instance Group Manager for this group.
|
|
261
|
+
class ManagedGroupConfig; end
|
|
262
|
+
|
|
263
|
+
# Specifies the type and number of accelerator cards attached to the instances
|
|
264
|
+
# of an instance group (see [GPUs on Compute Engine](https://cloud.google.com/compute/docs/gpus/)).
|
|
265
|
+
# @!attribute [rw] accelerator_type_uri
|
|
266
|
+
# @return [String]
|
|
267
|
+
# Full URL, partial URI, or short name of the accelerator type resource to
|
|
268
|
+
# expose to this instance. See [Compute Engine AcceleratorTypes](
|
|
269
|
+
# /compute/docs/reference/beta/acceleratorTypes)
|
|
270
|
+
#
|
|
271
|
+
# Examples
|
|
272
|
+
# * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
|
|
273
|
+
# * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
|
|
274
|
+
# * `nvidia-tesla-k80`
|
|
275
|
+
#
|
|
276
|
+
# **Auto Zone Exception**: If you are using the Cloud Dataproc
|
|
277
|
+
# [Auto Zone Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
|
|
278
|
+
# feature, you must use the short name of the accelerator type
|
|
279
|
+
# resource, for example, `nvidia-tesla-k80`.
|
|
280
|
+
# @!attribute [rw] accelerator_count
|
|
281
|
+
# @return [Integer]
|
|
282
|
+
# The number of the accelerator cards of this type exposed to this instance.
|
|
283
|
+
class AcceleratorConfig; end
|
|
284
|
+
|
|
285
|
+
# Specifies the config of disk options for a group of VM instances.
|
|
286
|
+
# @!attribute [rw] boot_disk_type
|
|
287
|
+
# @return [String]
|
|
288
|
+
# Optional. Type of the boot disk (default is "pd-standard").
|
|
289
|
+
# Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
|
|
290
|
+
# "pd-standard" (Persistent Disk Hard Disk Drive).
|
|
291
|
+
# @!attribute [rw] boot_disk_size_gb
|
|
292
|
+
# @return [Integer]
|
|
293
|
+
# Optional. Size in GB of the boot disk (default is 500GB).
|
|
294
|
+
# @!attribute [rw] num_local_ssds
|
|
295
|
+
# @return [Integer]
|
|
296
|
+
# Optional. Number of attached SSDs, from 0 to 4 (default is 0).
|
|
297
|
+
# If SSDs are not attached, the boot disk is used to store runtime logs and
|
|
298
|
+
# [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
|
|
299
|
+
# If one or more SSDs are attached, this runtime bulk
|
|
300
|
+
# data is spread across them, and the boot disk contains only basic
|
|
301
|
+
# config and installed binaries.
|
|
302
|
+
class DiskConfig; end
|
|
303
|
+
|
|
304
|
+
# Specifies the cluster auto-delete schedule configuration.
|
|
305
|
+
# @!attribute [rw] idle_delete_ttl
|
|
306
|
+
# @return [Google::Protobuf::Duration]
|
|
307
|
+
# Optional. The duration to keep the cluster alive while idling.
|
|
308
|
+
# Passing this threshold will cause the cluster to be
|
|
309
|
+
# deleted. Valid range: **[10m, 14d]**.
|
|
310
|
+
#
|
|
311
|
+
# Example: **"10m"**, the minimum value, to delete the
|
|
312
|
+
# cluster when it has had no jobs running for 10 minutes.
|
|
313
|
+
# @!attribute [rw] auto_delete_time
|
|
314
|
+
# @return [Google::Protobuf::Timestamp]
|
|
315
|
+
# Optional. The time when cluster will be auto-deleted.
|
|
316
|
+
# @!attribute [rw] auto_delete_ttl
|
|
317
|
+
# @return [Google::Protobuf::Duration]
|
|
318
|
+
# Optional. The lifetime duration of cluster. The cluster will be
|
|
319
|
+
# auto-deleted at the end of this period. Valid range: **[10m, 14d]**.
|
|
320
|
+
#
|
|
321
|
+
# Example: **"1d"**, to delete the cluster 1 day after its creation..
|
|
322
|
+
class LifecycleConfig; end
|
|
323
|
+
|
|
324
|
+
# Specifies an executable to run on a fully configured node and a
|
|
325
|
+
# timeout period for executable completion.
|
|
326
|
+
# @!attribute [rw] executable_file
|
|
327
|
+
# @return [String]
|
|
328
|
+
# Required. Cloud Storage URI of executable file.
|
|
329
|
+
# @!attribute [rw] execution_timeout
|
|
330
|
+
# @return [Google::Protobuf::Duration]
|
|
331
|
+
# Optional. Amount of time executable has to complete. Default is
|
|
332
|
+
# 10 minutes. Cluster creation fails with an explanatory error message (the
|
|
333
|
+
# name of the executable that caused the error and the exceeded timeout
|
|
334
|
+
# period) if the executable is not completed at end of the timeout period.
|
|
335
|
+
class NodeInitializationAction; end
|
|
336
|
+
|
|
337
|
+
# The status of a cluster and its instances.
|
|
338
|
+
# @!attribute [rw] state
|
|
339
|
+
# @return [Google::Cloud::Dataproc::V1beta2::ClusterStatus::State]
|
|
340
|
+
# Output only. The cluster's state.
|
|
341
|
+
# @!attribute [rw] detail
|
|
342
|
+
# @return [String]
|
|
343
|
+
# Output only. Optional details of cluster's state.
|
|
344
|
+
# @!attribute [rw] state_start_time
|
|
345
|
+
# @return [Google::Protobuf::Timestamp]
|
|
346
|
+
# Output only. Time when this state was entered.
|
|
347
|
+
# @!attribute [rw] substate
|
|
348
|
+
# @return [Google::Cloud::Dataproc::V1beta2::ClusterStatus::Substate]
|
|
349
|
+
# Output only. Additional state information that includes
|
|
350
|
+
# status reported by the agent.
|
|
351
|
+
class ClusterStatus
|
|
352
|
+
# The cluster state.
|
|
353
|
+
module State
|
|
354
|
+
# The cluster state is unknown.
|
|
355
|
+
UNKNOWN = 0
|
|
356
|
+
|
|
357
|
+
# The cluster is being created and set up. It is not ready for use.
|
|
358
|
+
CREATING = 1
|
|
359
|
+
|
|
360
|
+
# The cluster is currently running and healthy. It is ready for use.
|
|
361
|
+
RUNNING = 2
|
|
362
|
+
|
|
363
|
+
# The cluster encountered an error. It is not ready for use.
|
|
364
|
+
ERROR = 3
|
|
365
|
+
|
|
366
|
+
# The cluster is being deleted. It cannot be used.
|
|
367
|
+
DELETING = 4
|
|
368
|
+
|
|
369
|
+
# The cluster is being updated. It continues to accept and process jobs.
|
|
370
|
+
UPDATING = 5
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# The cluster substate.
|
|
374
|
+
module Substate
|
|
375
|
+
# The cluster substate is unknown.
|
|
376
|
+
UNSPECIFIED = 0
|
|
377
|
+
|
|
378
|
+
# The cluster is known to be in an unhealthy state
|
|
379
|
+
# (for example, critical daemons are not running or HDFS capacity is
|
|
380
|
+
# exhausted).
|
|
381
|
+
#
|
|
382
|
+
# Applies to RUNNING state.
|
|
383
|
+
UNHEALTHY = 1
|
|
384
|
+
|
|
385
|
+
# The agent-reported status is out of date (may occur if
|
|
386
|
+
# Cloud Dataproc loses communication with Agent).
|
|
387
|
+
#
|
|
388
|
+
# Applies to RUNNING state.
|
|
389
|
+
STALE_STATUS = 2
|
|
390
|
+
end
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Specifies the selection and config of software inside the cluster.
|
|
394
|
+
# @!attribute [rw] image_version
|
|
395
|
+
# @return [String]
|
|
396
|
+
# Optional. The version of software inside the cluster. It must be one of the supported
|
|
397
|
+
# [Cloud Dataproc Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions),
|
|
398
|
+
# such as "1.2" (including a subminor version, such as "1.2.29"), or the
|
|
399
|
+
# ["preview" version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
|
|
400
|
+
# If unspecified, it defaults to the latest version.
|
|
401
|
+
# @!attribute [rw] properties
|
|
402
|
+
# @return [Hash{String => String}]
|
|
403
|
+
# Optional. The properties to set on daemon config files.
|
|
404
|
+
#
|
|
405
|
+
# Property keys are specified in `prefix:property` format, such as
|
|
406
|
+
# `core:fs.defaultFS`. The following are supported prefixes
|
|
407
|
+
# and their mappings:
|
|
408
|
+
#
|
|
409
|
+
# * capacity-scheduler: `capacity-scheduler.xml`
|
|
410
|
+
# * core: `core-site.xml`
|
|
411
|
+
# * distcp: `distcp-default.xml`
|
|
412
|
+
# * hdfs: `hdfs-site.xml`
|
|
413
|
+
# * hive: `hive-site.xml`
|
|
414
|
+
# * mapred: `mapred-site.xml`
|
|
415
|
+
# * pig: `pig.properties`
|
|
416
|
+
# * spark: `spark-defaults.conf`
|
|
417
|
+
# * yarn: `yarn-site.xml`
|
|
418
|
+
#
|
|
419
|
+
# For more information, see
|
|
420
|
+
# [Cluster properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
|
|
421
|
+
class SoftwareConfig; end
|
|
422
|
+
|
|
423
|
+
# Contains cluster daemon metrics, such as HDFS and YARN stats.
|
|
424
|
+
#
|
|
425
|
+
# **Beta Feature**: This report is available for testing purposes only. It may
|
|
426
|
+
# be changed before final release.
|
|
427
|
+
# @!attribute [rw] hdfs_metrics
|
|
428
|
+
# @return [Hash{String => Integer}]
|
|
429
|
+
# The HDFS metrics.
|
|
430
|
+
# @!attribute [rw] yarn_metrics
|
|
431
|
+
# @return [Hash{String => Integer}]
|
|
432
|
+
# The YARN metrics.
|
|
433
|
+
class ClusterMetrics; end
|
|
434
|
+
|
|
435
|
+
# A request to create a cluster.
|
|
436
|
+
# @!attribute [rw] project_id
|
|
437
|
+
# @return [String]
|
|
438
|
+
# Required. The ID of the Google Cloud Platform project that the cluster
|
|
439
|
+
# belongs to.
|
|
440
|
+
# @!attribute [rw] region
|
|
441
|
+
# @return [String]
|
|
442
|
+
# Required. The Cloud Dataproc region in which to handle the request.
|
|
443
|
+
# @!attribute [rw] cluster
|
|
444
|
+
# @return [Google::Cloud::Dataproc::V1beta2::Cluster]
|
|
445
|
+
# Required. The cluster to create.
|
|
446
|
+
# @!attribute [rw] request_id
|
|
447
|
+
# @return [String]
|
|
448
|
+
# Optional. A unique id used to identify the request. If the server
|
|
449
|
+
# receives two {Google::Cloud::Dataproc::V1beta2::CreateClusterRequest CreateClusterRequest} requests with the same
|
|
450
|
+
# id, then the second request will be ignored and the
|
|
451
|
+
# first {Google::Longrunning::Operation} created and stored in the backend
|
|
452
|
+
# is returned.
|
|
453
|
+
#
|
|
454
|
+
# It is recommended to always set this value to a
|
|
455
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
|
|
456
|
+
#
|
|
457
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9),
|
|
458
|
+
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
|
459
|
+
class CreateClusterRequest; end
|
|
460
|
+
|
|
461
|
+
# A request to update a cluster.
|
|
462
|
+
# @!attribute [rw] project_id
|
|
463
|
+
# @return [String]
|
|
464
|
+
# Required. The ID of the Google Cloud Platform project the
|
|
465
|
+
# cluster belongs to.
|
|
466
|
+
# @!attribute [rw] region
|
|
467
|
+
# @return [String]
|
|
468
|
+
# Required. The Cloud Dataproc region in which to handle the request.
|
|
469
|
+
# @!attribute [rw] cluster_name
|
|
470
|
+
# @return [String]
|
|
471
|
+
# Required. The cluster name.
|
|
472
|
+
# @!attribute [rw] cluster
|
|
473
|
+
# @return [Google::Cloud::Dataproc::V1beta2::Cluster]
|
|
474
|
+
# Required. The changes to the cluster.
|
|
475
|
+
# @!attribute [rw] graceful_decommission_timeout
|
|
476
|
+
# @return [Google::Protobuf::Duration]
|
|
477
|
+
# Optional. Timeout for graceful YARN decomissioning. Graceful
|
|
478
|
+
# decommissioning allows removing nodes from the cluster without
|
|
479
|
+
# interrupting jobs in progress. Timeout specifies how long to wait for jobs
|
|
480
|
+
# in progress to finish before forcefully removing nodes (and potentially
|
|
481
|
+
# interrupting jobs). Default timeout is 0 (for forceful decommission), and
|
|
482
|
+
# the maximum allowed timeout is 1 day.
|
|
483
|
+
#
|
|
484
|
+
# Only supported on Dataproc image versions 1.2 and higher.
|
|
485
|
+
# @!attribute [rw] update_mask
|
|
486
|
+
# @return [Google::Protobuf::FieldMask]
|
|
487
|
+
# Required. Specifies the path, relative to `Cluster`, of
|
|
488
|
+
# the field to update. For example, to change the number of workers
|
|
489
|
+
# in a cluster to 5, the `update_mask` parameter would be
|
|
490
|
+
# specified as `config.worker_config.num_instances`,
|
|
491
|
+
# and the `PATCH` request body would specify the new value, as follows:
|
|
492
|
+
#
|
|
493
|
+
# {
|
|
494
|
+
# "config":{
|
|
495
|
+
# "workerConfig":{
|
|
496
|
+
# "numInstances":"5"
|
|
497
|
+
# }
|
|
498
|
+
# }
|
|
499
|
+
# }
|
|
500
|
+
#
|
|
501
|
+
# Similarly, to change the number of preemptible workers in a cluster to 5, the
|
|
502
|
+
# `update_mask` parameter would be `config.secondary_worker_config.num_instances`,
|
|
503
|
+
# and the `PATCH` request body would be set as follows:
|
|
504
|
+
#
|
|
505
|
+
# {
|
|
506
|
+
# "config":{
|
|
507
|
+
# "secondaryWorkerConfig":{
|
|
508
|
+
# "numInstances":"5"
|
|
509
|
+
# }
|
|
510
|
+
# }
|
|
511
|
+
# }
|
|
512
|
+
# <strong>Note:</strong> currently only the following fields can be updated:
|
|
513
|
+
#
|
|
514
|
+
# <table>
|
|
515
|
+
# <tr>
|
|
516
|
+
# <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
|
|
517
|
+
# </tr>
|
|
518
|
+
# <tr>
|
|
519
|
+
# <td>labels</td><td>Updates labels</td>
|
|
520
|
+
# </tr>
|
|
521
|
+
# <tr>
|
|
522
|
+
# <td>config.worker_config.num_instances</td><td>Resize primary worker group</td>
|
|
523
|
+
# </tr>
|
|
524
|
+
# <tr>
|
|
525
|
+
# <td>config.secondary_worker_config.num_instances</td><td>Resize secondary worker group</td>
|
|
526
|
+
# </tr>
|
|
527
|
+
# <tr>
|
|
528
|
+
# <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL duration</td>
|
|
529
|
+
# </tr>
|
|
530
|
+
# <tr>
|
|
531
|
+
# <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL deletion timestamp</td>
|
|
532
|
+
# </tr>
|
|
533
|
+
# <tr>
|
|
534
|
+
# <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL duration</td>
|
|
535
|
+
# </tr>
|
|
536
|
+
# </table>
|
|
537
|
+
# @!attribute [rw] request_id
|
|
538
|
+
# @return [String]
|
|
539
|
+
# Optional. A unique id used to identify the request. If the server
|
|
540
|
+
# receives two {Google::Cloud::Dataproc::V1beta2::UpdateClusterRequest UpdateClusterRequest} requests with the same
|
|
541
|
+
# id, then the second request will be ignored and the
|
|
542
|
+
# first {Google::Longrunning::Operation} created and stored in the
|
|
543
|
+
# backend is returned.
|
|
544
|
+
#
|
|
545
|
+
# It is recommended to always set this value to a
|
|
546
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
|
|
547
|
+
#
|
|
548
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9),
|
|
549
|
+
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
|
550
|
+
class UpdateClusterRequest; end
|
|
551
|
+
|
|
552
|
+
# A request to delete a cluster.
|
|
553
|
+
# @!attribute [rw] project_id
|
|
554
|
+
# @return [String]
|
|
555
|
+
# Required. The ID of the Google Cloud Platform project that the cluster
|
|
556
|
+
# belongs to.
|
|
557
|
+
# @!attribute [rw] region
|
|
558
|
+
# @return [String]
|
|
559
|
+
# Required. The Cloud Dataproc region in which to handle the request.
|
|
560
|
+
# @!attribute [rw] cluster_name
|
|
561
|
+
# @return [String]
|
|
562
|
+
# Required. The cluster name.
|
|
563
|
+
# @!attribute [rw] cluster_uuid
|
|
564
|
+
# @return [String]
|
|
565
|
+
# Optional. Specifying the `cluster_uuid` means the RPC should fail
|
|
566
|
+
# (with error NOT_FOUND) if cluster with specified UUID does not exist.
|
|
567
|
+
# @!attribute [rw] request_id
|
|
568
|
+
# @return [String]
|
|
569
|
+
# Optional. A unique id used to identify the request. If the server
|
|
570
|
+
# receives two {Google::Cloud::Dataproc::V1beta2::DeleteClusterRequest DeleteClusterRequest} requests with the same
|
|
571
|
+
# id, then the second request will be ignored and the
|
|
572
|
+
# first {Google::Longrunning::Operation} created and stored in the
|
|
573
|
+
# backend is returned.
|
|
574
|
+
#
|
|
575
|
+
# It is recommended to always set this value to a
|
|
576
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
|
|
577
|
+
#
|
|
578
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9),
|
|
579
|
+
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
|
580
|
+
class DeleteClusterRequest; end
|
|
581
|
+
|
|
582
|
+
# Request to get the resource representation for a cluster in a project.
|
|
583
|
+
# @!attribute [rw] project_id
|
|
584
|
+
# @return [String]
|
|
585
|
+
# Required. The ID of the Google Cloud Platform project that the cluster
|
|
586
|
+
# belongs to.
|
|
587
|
+
# @!attribute [rw] region
|
|
588
|
+
# @return [String]
|
|
589
|
+
# Required. The Cloud Dataproc region in which to handle the request.
|
|
590
|
+
# @!attribute [rw] cluster_name
|
|
591
|
+
# @return [String]
|
|
592
|
+
# Required. The cluster name.
|
|
593
|
+
class GetClusterRequest; end
|
|
594
|
+
|
|
595
|
+
# A request to list the clusters in a project.
|
|
596
|
+
# @!attribute [rw] project_id
|
|
597
|
+
# @return [String]
|
|
598
|
+
# Required. The ID of the Google Cloud Platform project that the cluster
|
|
599
|
+
# belongs to.
|
|
600
|
+
# @!attribute [rw] region
|
|
601
|
+
# @return [String]
|
|
602
|
+
# Required. The Cloud Dataproc region in which to handle the request.
|
|
603
|
+
# @!attribute [rw] filter
|
|
604
|
+
# @return [String]
|
|
605
|
+
# Optional. A filter constraining the clusters to list. Filters are
|
|
606
|
+
# case-sensitive and have the following syntax:
|
|
607
|
+
#
|
|
608
|
+
# field = value [AND [field = value]] ...
|
|
609
|
+
#
|
|
610
|
+
# where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
|
|
611
|
+
# and `[KEY]` is a label key. **value** can be `*` to match all values.
|
|
612
|
+
# `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
|
|
613
|
+
# `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
|
|
614
|
+
# contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
|
|
615
|
+
# contains the `DELETING` and `ERROR` states.
|
|
616
|
+
# `clusterName` is the name of the cluster provided at creation time.
|
|
617
|
+
# Only the logical `AND` operator is supported; space-separated items are
|
|
618
|
+
# treated as having an implicit `AND` operator.
|
|
619
|
+
#
|
|
620
|
+
# Example filter:
|
|
621
|
+
#
|
|
622
|
+
# status.state = ACTIVE AND clusterName = mycluster
|
|
623
|
+
# AND labels.env = staging AND labels.starred = *
|
|
624
|
+
# @!attribute [rw] page_size
|
|
625
|
+
# @return [Integer]
|
|
626
|
+
# Optional. The standard List page size.
|
|
627
|
+
# @!attribute [rw] page_token
|
|
628
|
+
# @return [String]
|
|
629
|
+
# Optional. The standard List page token.
|
|
630
|
+
class ListClustersRequest; end
|
|
631
|
+
|
|
632
|
+
# The list of all clusters in a project.
|
|
633
|
+
# @!attribute [rw] clusters
|
|
634
|
+
# @return [Array<Google::Cloud::Dataproc::V1beta2::Cluster>]
|
|
635
|
+
# Output only. The clusters in the project.
|
|
636
|
+
# @!attribute [rw] next_page_token
|
|
637
|
+
# @return [String]
|
|
638
|
+
# Output only. This token is included in the response if there are more
|
|
639
|
+
# results to fetch. To fetch additional results, provide this value as the
|
|
640
|
+
# `page_token` in a subsequent <code>ListClustersRequest</code>.
|
|
641
|
+
class ListClustersResponse; end
|
|
642
|
+
|
|
643
|
+
# A request to collect cluster diagnostic information.
|
|
644
|
+
# @!attribute [rw] project_id
|
|
645
|
+
# @return [String]
|
|
646
|
+
# Required. The ID of the Google Cloud Platform project that the cluster
|
|
647
|
+
# belongs to.
|
|
648
|
+
# @!attribute [rw] region
|
|
649
|
+
# @return [String]
|
|
650
|
+
# Required. The Cloud Dataproc region in which to handle the request.
|
|
651
|
+
# @!attribute [rw] cluster_name
|
|
652
|
+
# @return [String]
|
|
653
|
+
# Required. The cluster name.
|
|
654
|
+
class DiagnoseClusterRequest; end
|
|
655
|
+
|
|
656
|
+
# The location of diagnostic output.
|
|
657
|
+
# @!attribute [rw] output_uri
|
|
658
|
+
# @return [String]
|
|
659
|
+
# Output only. The Cloud Storage URI of the diagnostic output.
|
|
660
|
+
# The output report is a plain text file with a summary of collected
|
|
661
|
+
# diagnostics.
|
|
662
|
+
class DiagnoseClusterResults; end
|
|
663
|
+
end
|
|
664
|
+
end
|
|
665
|
+
end
|
|
666
|
+
end
|