Skip to content

Commit 463caca

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added DatabaseType field for the type of backing store used
feat: Added AVRO DatabaseDumpSpec for importing and exporting Avro files feat: Added additional endTime field for MetadataImports feat: Added RESTORING status on Backups feat: Added support to record the services that are restoring the backup feat: Added configuration for Dataplex integration feat: Added support for IAM management for metadata resources feat: Added AuxiliaryVersionConfig for configuring the auxiliary hive versions during creation or update of the DPMS instance feat: Added NetworkConfig for exposing the DPMS endpoint in multiple subnetworks using PSC (this skips the need for VPC peering) feat: Added EncryptionConfig which contains information used to configure the Dataproc Metastore service to encrypt customer data at rest (CMEK) docs: formatting improvements PiperOrigin-RevId: 436271267
1 parent 22e0fa0 commit 463caca

3 files changed

Lines changed: 201 additions & 16 deletions

File tree

google/cloud/metastore/v1alpha/BUILD.bazel

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ java_gapic_library(
7272
srcs = [":metastore_proto_with_info"],
7373
gapic_yaml = "metastore_gapic.yaml",
7474
grpc_service_config = "metastore_grpc_service_config.json",
75+
service_yaml = "metastore_v1alpha.yaml",
7576
test_deps = [
7677
":metastore_java_grpc",
7778
],
7879
deps = [
7980
":metastore_java_proto",
81+
"//google/api:api_java_proto",
8082
],
8183
)
8284

@@ -203,7 +205,6 @@ php_grpc_library(
203205
php_gapic_library(
204206
name = "metastore_php_gapic",
205207
srcs = [":metastore_proto_with_info"],
206-
gapic_yaml = "metastore_gapic.yaml",
207208
grpc_service_config = "metastore_grpc_service_config.json",
208209
service_yaml = "metastore_v1alpha.yaml",
209210
deps = [
@@ -340,4 +341,20 @@ csharp_gapic_assembly_pkg(
340341
##############################################################################
341342
# C++
342343
##############################################################################
343-
# Put your C++ rules here
344+
load(
345+
"@com_google_googleapis_imports//:imports.bzl",
346+
"cc_grpc_library",
347+
"cc_proto_library",
348+
)
349+
350+
cc_proto_library(
351+
name = "metastore_cc_proto",
352+
deps = [":metastore_proto"],
353+
)
354+
355+
cc_grpc_library(
356+
name = "metastore_cc_grpc",
357+
srcs = [":metastore_proto"],
358+
grpc_only = True,
359+
deps = [":metastore_cc_proto"],
360+
)

google/cloud/metastore/v1alpha/metastore.proto

Lines changed: 164 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 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.
@@ -30,14 +30,23 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1alp
3030
option java_multiple_files = true;
3131
option java_outer_classname = "MetastoreProto";
3232
option java_package = "com.google.cloud.metastore.v1alpha";
33+
option php_namespace = "Google\\Cloud\\Metastore\\V1alpha";
3334
option (google.api.resource_definition) = {
3435
type: "compute.googleapis.com/Network"
3536
pattern: "projects/{project}/global/networks/{network}"
3637
};
38+
option (google.api.resource_definition) = {
39+
type: "compute.googleapis.com/Subnetwork"
40+
pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}"
41+
};
42+
option (google.api.resource_definition) = {
43+
type: "dataplex.googleapis.com/Lake"
44+
pattern: "projects/{project}/locations/{location}/lakes/{lake}"
45+
};
3746

3847
// Configures and manages metastore services.
39-
// Metastore services are fully managed, highly available, auto-scaled,
40-
// auto-healing, OSS-native deployments of technical metadata management
48+
// Metastore services are fully managed, highly available, autoscaled,
49+
// autohealing, OSS-native deployments of technical metadata management
4150
// software. Each metastore service exposes a network endpoint through which
4251
// metadata queries are served. Metadata queries can originate from a variety
4352
// of sources, including Apache Hive, Apache Presto, and Apache Spark.
@@ -194,7 +203,7 @@ service DataprocMetastore {
194203
option (google.api.method_signature) = "name";
195204
}
196205

197-
// Creates a new Backup in a given project and location.
206+
// Creates a new backup in a given project and location.
198207
rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
199208
option (google.api.http) = {
200209
post: "/v1alpha/{parent=projects/*/locations/*/services/*}/backups"
@@ -288,6 +297,18 @@ message Service {
288297
STABLE = 2;
289298
}
290299

300+
// The backend database type for the metastore service.
301+
enum DatabaseType {
302+
// The DATABASE_TYPE is not set.
303+
DATABASE_TYPE_UNSPECIFIED = 0;
304+
305+
// MySQL is used to persist the metastore data.
306+
MYSQL = 1;
307+
308+
// Spanner is used to persist the metastore data.
309+
SPANNER = 2;
310+
}
311+
291312
// Configuration properties specific to the underlying metastore service
292313
// technology (the software that serves metastore queries).
293314
oneof metastore_config {
@@ -347,6 +368,8 @@ message Service {
347368

348369
// The one hour maintenance window of the metastore service. This specifies
349370
// when the service can be restarted for maintenance purposes in UTC time.
371+
// Maintenance window is not needed for services with the SPANNER
372+
// database type.
350373
MaintenanceWindow maintenance_window = 15;
351374

352375
// Output only. The globally unique resource identifier of the metastore service.
@@ -358,12 +381,26 @@ message Service {
358381
// Immutable. The release channel of the service.
359382
// If unspecified, defaults to `STABLE`.
360383
ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE];
384+
385+
// Immutable. Information used to configure the Dataproc Metastore service to encrypt
386+
// customer data at rest. Cannot be updated.
387+
EncryptionConfig encryption_config = 20 [(google.api.field_behavior) = IMMUTABLE];
388+
389+
// Immutable. The configuration specifying the network settings for the
390+
// Dataproc Metastore service.
391+
NetworkConfig network_config = 21 [(google.api.field_behavior) = IMMUTABLE];
392+
393+
// Immutable. The database type that the Metastore service stores its data.
394+
DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE];
361395
}
362396

363397
// Specifies how metastore metadata should be integrated with external services.
364398
message MetadataIntegration {
365399
// The integration config for the Data Catalog service.
366400
DataCatalogConfig data_catalog_config = 1;
401+
402+
// The integration config for the Dataplex service.
403+
DataplexConfig dataplex_config = 2;
367404
}
368405

369406
// Specifies how metastore metadata should be integrated with the Data Catalog
@@ -374,6 +411,25 @@ message DataCatalogConfig {
374411
bool enabled = 2;
375412
}
376413

414+
// Specifies how metastore metadata should be integrated with the Dataplex
415+
// service.
416+
message DataplexConfig {
417+
// A reference to the Lake resources that this metastore service is attached
418+
// to. The key is the lake resource name. Example:
419+
// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
420+
map<string, Lake> lake_resources = 1;
421+
}
422+
423+
// Represents a Lake resource
424+
message Lake {
425+
// The Lake resource name.
426+
// Example:
427+
// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
428+
string name = 1 [(google.api.resource_reference) = {
429+
type: "dataplex.googleapis.com/Lake"
430+
}];
431+
}
432+
377433
// Maintenance window. This specifies when Dataproc Metastore
378434
// may perform system maintenance operation to the service.
379435
message MaintenanceWindow {
@@ -387,12 +443,26 @@ message MaintenanceWindow {
387443
// Specifies configuration information specific to running Hive metastore
388444
// software as the metastore service.
389445
message HiveMetastoreConfig {
446+
// Protocols available for serving the metastore service endpoint.
447+
enum EndpointProtocol {
448+
// The protocol is not set.
449+
ENDPOINT_PROTOCOL_UNSPECIFIED = 0;
450+
451+
// Use the legacy Apache Thrift protocol for the metastore service endpoint.
452+
THRIFT = 1;
453+
454+
// Use the modernized gRPC protocol for the metastore service endpoint.
455+
GRPC = 2;
456+
}
457+
390458
// Immutable. The Hive metastore schema version.
391459
string version = 1 [(google.api.field_behavior) = IMMUTABLE];
392460

393461
// A mapping of Hive metastore configuration key-value pairs to apply to the
394462
// Hive metastore (configured in `hive-site.xml`). The mappings
395-
// override system defaults (some keys cannot be overridden).
463+
// override system defaults (some keys cannot be overridden). These
464+
// overrides are also applied to auxiliary versions and can be further
465+
// customized in the auxiliary version's `AuxiliaryVersionConfig`.
396466
map<string, string> config_overrides = 2;
397467

398468
// Information used to configure the Hive metastore service as a service
@@ -401,6 +471,20 @@ message HiveMetastoreConfig {
401471
// (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
402472
// while omitting this field from the request's `service`.
403473
KerberosConfig kerberos_config = 3;
474+
475+
// The protocol to use for the metastore service endpoint. If unspecified,
476+
// defaults to `THRIFT`.
477+
EndpointProtocol endpoint_protocol = 4;
478+
479+
// A mapping of Hive metastore version to the auxiliary version
480+
// configuration. When specified, a secondary Hive metastore service is
481+
// created along with the primary service. All auxiliary versions must be less
482+
// than the service's primary version. The key is the auxiliary service name
483+
// and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
484+
// means that the first character must be a lowercase letter, and all the
485+
// following characters must be hyphens, lowercase letters, or digits, except
486+
// the last character, which cannot be a hyphen.
487+
map<string, AuxiliaryVersionConfig> auxiliary_versions = 5;
404488
}
405489

406490
// Configuration information for a Kerberos principal.
@@ -415,7 +499,7 @@ message KerberosConfig {
415499
string principal = 2;
416500

417501
// A Cloud Storage URI that specifies the path to a
418-
// krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf,
502+
// krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
419503
// although the file does not need to be named krb5.conf explicitly.
420504
string krb5_config_gcs_uri = 3;
421505
}
@@ -431,6 +515,60 @@ message Secret {
431515
}
432516
}
433517

518+
// Encryption settings for the service.
519+
message EncryptionConfig {
520+
// The fully qualified customer provided Cloud KMS key name to use for
521+
// customer data encryption, in the following form:
522+
//
523+
// `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
524+
string kms_key = 1;
525+
}
526+
527+
// Configuration information for the auxiliary service versions.
528+
message AuxiliaryVersionConfig {
529+
// The Hive metastore version of the auxiliary service. It must be less
530+
// than the primary Hive metastore service's version.
531+
string version = 1;
532+
533+
// A mapping of Hive metastore configuration key-value pairs to apply to the
534+
// auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
535+
// the primary version's overrides. If keys are present in both the auxiliary
536+
// version's overrides and the primary version's overrides, the value from
537+
// the auxiliary version's overrides takes precedence.
538+
map<string, string> config_overrides = 2;
539+
540+
// Output only. The network configuration contains the endpoint URI(s) of the auxiliary
541+
// Hive metastore service.
542+
NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
543+
}
544+
545+
// Network configuration for the Dataproc Metastore service.
546+
message NetworkConfig {
547+
// Contains information of the customer's network configurations.
548+
message Consumer {
549+
oneof vpc_resource {
550+
// The subnetwork of the customer project from which an IP address is
551+
// reserved and used as the Dataproc Metastore service's
552+
// endpoint. It is accessible to hosts in the subnet and to all
553+
// hosts in a subnet in the same region and same network. There must
554+
// be at least one IP address available in the subnet's primary range. The
555+
// subnet is specified in the following form:
556+
//
557+
// `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}
558+
string subnetwork = 1 [(google.api.resource_reference) = {
559+
type: "compute.googleapis.com/Subnetwork"
560+
}];
561+
}
562+
563+
// Output only. The URI of the endpoint used to access the metastore service.
564+
string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
565+
}
566+
567+
// Immutable. The consumer-side network configuration for the Dataproc Metastore
568+
// instance.
569+
repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE];
570+
}
571+
434572
// The metadata management activities of the metastore service.
435573
message MetadataManagementActivity {
436574
// Output only. The latest metadata exports of the metastore service.
@@ -506,12 +644,15 @@ message MetadataImport {
506644
// The description of the metadata import.
507645
string description = 2;
508646

509-
// Output only. The time when the metadata import was created.
647+
// Output only. The time when the metadata import was started.
510648
google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
511649

512650
// Output only. The time when the metadata import was last updated.
513651
google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
514652

653+
// Output only. The time when the metadata import finished.
654+
google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
655+
515656
// Output only. The current state of the metadata import.
516657
State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
517658
}
@@ -579,6 +720,9 @@ message Backup {
579720

580721
// The backup failed.
581722
FAILED = 4;
723+
724+
// The backup is being restored.
725+
RESTORING = 5;
582726
}
583727

584728
// Immutable. The relative resource name of the backup, in the following form:
@@ -600,6 +744,9 @@ message Backup {
600744

601745
// The description of the backup.
602746
string description = 6;
747+
748+
// Output only. Services that are restoring from the backup.
749+
repeated string restoring_services = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
603750
}
604751

605752
// The details of a metadata restore operation.
@@ -622,7 +769,7 @@ message Restore {
622769
CANCELLED = 4;
623770
}
624771

625-
// The type of restore.
772+
// The type of restore. If unspecified, defaults to `METADATA_ONLY`.
626773
enum RestoreType {
627774
// The restore type is unknown.
628775
RESTORE_TYPE_UNSPECIFIED = 0;
@@ -646,7 +793,7 @@ message Restore {
646793
// Output only. The relative resource name of the metastore service backup to restore
647794
// from, in the following form:
648795
//
649-
// `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
796+
// `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
650797
string backup = 4 [
651798
(google.api.field_behavior) = OUTPUT_ONLY,
652799
(google.api.resource_reference) = {
@@ -894,7 +1041,7 @@ message CreateMetadataImportRequest {
8941041
// Required. The relative resource name of the service in which to create a metastore
8951042
// import, in the following form:
8961043
//
897-
// `projects/{project_number}/locations/{location_id}/services/{service_id}`
1044+
// `projects/{project_number}/locations/{location_id}/services/{service_id}`.
8981045
string parent = 1 [
8991046
(google.api.field_behavior) = REQUIRED,
9001047
(google.api.resource_reference) = {
@@ -1029,7 +1176,7 @@ message CreateBackupRequest {
10291176
// Required. The relative resource name of the service in which to create a backup
10301177
// of the following form:
10311178
//
1032-
// `projects/{project_number}/locations/{location_id}/services/{service_id}`
1179+
// `projects/{project_number}/locations/{location_id}/services/{service_id}`.
10331180
string parent = 1 [
10341181
(google.api.field_behavior) = REQUIRED,
10351182
(google.api.resource_reference) = {
@@ -1105,7 +1252,7 @@ message ExportMetadataRequest {
11051252
// Required. The relative resource name of the metastore service to run export, in the
11061253
// following form:
11071254
//
1108-
// `projects/{project_id}/locations/{location_id}/services/{service_id}`
1255+
// `projects/{project_id}/locations/{location_id}/services/{service_id}`.
11091256
string service = 1 [
11101257
(google.api.field_behavior) = REQUIRED,
11111258
(google.api.resource_reference) = {
@@ -1136,7 +1283,7 @@ message RestoreServiceRequest {
11361283
// Required. The relative resource name of the metastore service to run restore, in the
11371284
// following form:
11381285
//
1139-
// `projects/{project_id}/locations/{location_id}/services/{service_id}`
1286+
// `projects/{project_id}/locations/{location_id}/services/{service_id}`.
11401287
string service = 1 [
11411288
(google.api.field_behavior) = REQUIRED,
11421289
(google.api.resource_reference) = {
@@ -1147,7 +1294,7 @@ message RestoreServiceRequest {
11471294
// Required. The relative resource name of the metastore service backup to restore
11481295
// from, in the following form:
11491296
//
1150-
// `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
1297+
// `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
11511298
string backup = 2 [
11521299
(google.api.field_behavior) = REQUIRED,
11531300
(google.api.resource_reference) = {
@@ -1227,6 +1374,9 @@ message DatabaseDumpSpec {
12271374

12281375
// Database dump is a MySQL dump file.
12291376
MYSQL = 1;
1377+
1378+
// Database dump contains Avro files.
1379+
AVRO = 2;
12301380
}
12311381

12321382

0 commit comments

Comments
 (0)